periodic staleData refetch functionality

+Query initialData support
+Query manual update support
+Query.reset support
This commit is contained in:
Kingkor Roy Tirtho
2022-05-28 18:28:20 +06:00
parent 4eadc99d15
commit aba6d1852b
6 changed files with 222 additions and 69 deletions
@@ -0,0 +1,13 @@
import 'package:fl_query/query_bowl.dart';
import 'package:flutter/material.dart';
class AnotherComponent extends StatelessWidget {
const AnotherComponent({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
final lol = QueryBowl.of(context).getQuery<String>("greetings");
if (lol?.data == null) return const CircularProgressIndicator();
return Text("${lol!.data!} from AnotherComponent");
}
}