query reusability by QueryJob

QueryJob.task External Data Support
Query task is now pure function
Query.data is non-nullable (even the type)
This commit is contained in:
Kingkor Roy Tirtho
2022-06-05 19:10:33 +06:00
parent 081a7f1344
commit 9bcdfc9db7
8 changed files with 209 additions and 89 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ class AnotherComponent extends StatelessWidget {
@override
Widget build(BuildContext context) {
final lol = QueryBowl.of(context).getQuery<String>("greetings");
final lol = QueryBowl.of(context).getQuery<String, void>("greetings");
if (lol?.data == null) return const CircularProgressIndicator();
return Text("${lol!.data!} from AnotherComponent");
}