docs: update according to the new query bowl refactor
This commit is contained in:
@@ -45,6 +45,7 @@ First wrap your `MaterialApp` with with `QueryBowlScope` widget
|
||||
```dart
|
||||
Widget build(BuildContext context) {
|
||||
return QueryBowlScope(
|
||||
bowl: QueryBowl(),
|
||||
child: MaterialApp(
|
||||
title: 'Fl-Query Example App',
|
||||
theme: ThemeData(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:fl_query/src/query_bowl.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
abstract class BaseOperation<Data, Error> extends ChangeNotifier {
|
||||
@@ -26,7 +27,7 @@ abstract class BaseOperation<Data, Error> extends ChangeNotifier {
|
||||
/// storage/cache
|
||||
Set<ValueKey<String>> _mounts = {};
|
||||
|
||||
final queryBowl;
|
||||
final QueryBowl queryBowl;
|
||||
|
||||
BaseOperation({
|
||||
required this.cacheTime,
|
||||
|
||||
@@ -264,7 +264,7 @@ class QueryBowl {
|
||||
options,
|
||||
externalData: externalData,
|
||||
previousData: previousData,
|
||||
queryBowl: this as dynamic,
|
||||
queryBowl: this,
|
||||
);
|
||||
query.updateDefaultOptions(
|
||||
cacheTime: cache.cacheTime,
|
||||
@@ -284,7 +284,7 @@ class QueryBowl {
|
||||
final infiniteQuery = InfiniteQuery<T, Outside, PageParam>.fromOptions(
|
||||
options,
|
||||
externalData: externalData,
|
||||
queryBowl: this as dynamic,
|
||||
queryBowl: this,
|
||||
);
|
||||
infiniteQuery.updateDefaultOptions(
|
||||
cacheTime: cache.cacheTime,
|
||||
@@ -400,7 +400,7 @@ class QueryBowl {
|
||||
} else {
|
||||
final mutation = Mutation<T, V>.fromOptions(
|
||||
mutationJob,
|
||||
queryBowl: this as dynamic,
|
||||
queryBowl: this,
|
||||
);
|
||||
if (onData != null) mutation.addDataListener(onData);
|
||||
if (onError != null) mutation.addErrorListener(onError);
|
||||
|
||||
Reference in New Issue
Block a user