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
+2 -4
View File
@@ -14,9 +14,8 @@ class QueryJob<T extends Object, Outside> {
// got from global options
final Duration? staleTime;
final Duration? cacheTime;
final QueryListener<T>? onData;
final QueryListener<dynamic>? onError;
QueryJob({
required this.queryKey,
required this.task,
@@ -24,8 +23,7 @@ class QueryJob<T extends Object, Outside> {
this.retryDelay,
this.initialData,
this.staleTime,
this.onData,
this.onError,
this.cacheTime,
this.enabled,
});
}