Open kingwill101 opened 2 months ago
Initially wanted to avoid introducing async everywhere but that will poses an issue for filters that require doing semi long operations.
e.g fetching a json endpoiny
FilterRegistyry.register("getJson", (value, args, namedArgs) async{ var url = Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'}); var response = await http.get(url); if (response.statusCode == 200) { var jsonResponse = convert.jsonDecode(response.body) as Map<String, dynamic>; return jsonResponse; } else { return []; } });
@cka29 I want to get this done but not sure of the right approach. It's a bit difficult supporting both async and none async with the same api vs adding say a renderAsync. Which approach would you prefer?
Initially wanted to avoid introducing async everywhere but that will poses an issue for filters that require doing semi long operations.
e.g fetching a json endpoiny