cache time & garbage collection support added

onData & onError callbacks WIP
This commit is contained in:
Kingkor Roy Tirtho
2022-06-12 15:18:43 +06:00
parent 547cf65dd8
commit f0a7579ea2
7 changed files with 130 additions and 37 deletions
+5 -1
View File
@@ -7,7 +7,11 @@ class AnotherComponent extends StatelessWidget {
@override
Widget build(BuildContext context) {
final lol = QueryBowl.of(context).getQuery<String, void>("greetings");
final deadQuery =
QueryBowl.of(context).getQuery<String, String>("external_data");
if (lol?.data == null) return const CircularProgressIndicator();
return Text("${lol!.data!} from AnotherComponent");
return Text(
"${lol!.data!} from AnotherComponent\nDeadQuery (It should be null after 10 seconds): ${deadQuery?.data}",
);
}
}