QueryState<T> class

Inheritance

Constructors

QueryState({required Future<T> query(), required RetryPolicy retryPolicy, Duration revalidate = const Duration(seconds: 60), bool cache = true, bool fetchOnInit = true, Duration? refresh})

Properties

cache bool
final
cancellationCompleter Completer<void>?
getter/setter pair
canRetry bool
no setter
error ↔ dynamic
getter/setter pair
eventStream Stream<QueryEvent>
no setter
expires DateTime
getter/setter pair
fetching bool
getter/setter pair
future Future<T>?
getter/setter pair
hasData bool
no setter
hasError bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isCached bool
no setter
isCancelled bool
getter/setter pair
isEmpty bool
no setter
isLoading bool
no setter
isRefreshing bool
no setter
onError ↔ void Function(dynamic error)?
getter/setter pair
query Future<T> Function()
final
retryCount int
getter/setter pair
retryPolicy RetryPolicy
getter/setter pair
revalidate Duration
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldRefresh bool
no setter
shouldRetry bool
no setter
snapshot AsyncSnapshot<T>
getter/setter pair
timer Timer?
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
cancelFetch() → void
dispatchCancelled() → void
dispatchComplete() → void
dispatchError() → void
dispatchEvent(QueryEvent event) → void
dispatchFetch() → void
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
fetch() → void
handleError(dynamic error) → void
markAsCancelled() → void
markAsComplete() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setRefresh(Duration refresh) → void
toString() String
A string representation of this object.
inherited
update(AsyncSnapshot<T> snapshot) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited