feat(infinite-query): add all the features of query in infinite query

Separated common logic of both `InfiniteQuery` and `Query` in a base class `BaseQuery` resulting in `InfiniteQuery` inheriting already having implemented features of `Query`
This commit is contained in:
Kingkor Roy Tirtho
2022-08-24 21:47:13 +06:00
parent 1452d7d79e
commit 61958c7d94
9 changed files with 498 additions and 411 deletions
@@ -1,7 +1,7 @@
import 'package:fl_query/src/query_bowl.dart';
import 'package:flutter/widgets.dart';
abstract class BaseOperation<Data> extends ChangeNotifier {
abstract class BaseOperation<Data, Error> extends ChangeNotifier {
/// The number of times the query should refetch in the time of error
/// before giving up
final int retries;
@@ -13,7 +13,7 @@ abstract class BaseOperation<Data> extends ChangeNotifier {
// all properties
Data? data;
dynamic error;
Error? error;
/// total count of how many times the query retried to get a successful
/// result