MultipleFutureGetController class abstract

Provides functionality for a Controller to run and fetch data using multiple future

Inheritance
Implemented types
Implementers

Properties

anyError → dynamic
Returns error of any object that still have a error status.
no setterinherited
busyStates Map<Object, bool>
no setterinherited
changeSource bool
getter/setter pairinherited
dataMap Map<Object, dynamic>
no setterinherited
disposed bool
no setterinherited
error String?
Returns the error status of the Controller
getter/setter pairinherited
errorStates Map<Object, dynamic>
no setterinherited
futuresMap Map<Object, FutureCallback>
no setter
futuresToRun Map<Object, FutureCallback>
Multiple futures to run at the startup
no setter
hasAnyError bool
Returns true if any objects still have a error status.
no setterinherited
hasError bool
Returns the error status of the Controller
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
no setterinherited
initialized bool
Checks whether the controller has already been initialized.
no setterinherited
isAnyBusy bool
Returns true if any objects still have a busy status that is true.
no setterinherited
isBusy bool
Returns the busy status of the Controller
no setterinherited
isClosed bool
Checks whether the controller has already been closed.
no setterinherited
isDataReady bool
Returns the data ready status of the Controller if no error occurred
no setter
isInitialised bool
Returns the initialisation status of the Controller when all futures are completed
no setterinherited
isReady bool
Returns the ready status of the Controller even if error occurred
no setter
listeners int
no setterinherited
onDelete InternalFinalCallback<void>
Internal callback that starts the cycle of this controller.
finalinherited
onReadyCalled bool
getter/setter pairinherited
onStart InternalFinalCallback<void>
Called at the exact moment the widget is allocated in memory. It uses an internal "callable" type, to avoid any @overrides in subclases. This method should be internal and is required to define the lifetime cycle of the subclass.
finalinherited
runner FutureCallback?
Returns the runner of the Controller
getter/setter pairinherited
runnerMap Map<Object, FutureCallback>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

$configureLifeCycle() → void
inherited
addListener(GetStateUpdate listener) → Disposer
Register a closure to be called when the object notifies its listeners.
inherited
addListenerId(Object? key, GetStateUpdate listener) → Disposer
inherited
beforeInit() Future
override
busyFor(Object key) bool
Returns the busy status for a key if it exists. Returns false if not present
inherited
clearAllData() bool
Clears all data and states
inherited
clearAllStateData([Object? key]) bool
Clears all states but data by key
inherited
clearBusy() → void
Clears all the busy states
inherited
clearData([Object? key]) bool
Clears the data by key
inherited
clearErrors() → void
Clears all the errors
inherited
clearStateData([Object? key]) bool
Clears states and data by key
inherited
data<T>() → T?
Returns the data of the Controller
dataFor<T>(Object key) → T?
Returns the data by key
inherited
dataReady(Object key) bool
Returns the data ready status by key if no error occurred
inherited
dispose() → void
inherited
disposeId(Object id) → void
To dispose an id from future updates(), this ids are registered by GetBuilder() or similar, so is a way to unlink the state change with the Widget from the Controller.
inherited
errorFor(Object key) String?
Returns the error by key
inherited
futureToRun() Future
Single future to run at the startup
hasErrorFor(Object key) bool
Returns the error status by key
inherited
hasErrorOr([bool? condition]) bool
Returns the error status of the Controller and checks if condition valid
initialise() Future
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyChildrens() → void
inherited
notifySourceChanged({bool clearOldData = false}) → void
inherited
onClose() → void
Called before onDelete method. onClose might be used to dispose resources used by the controller. Like closing events, or streams before the controller is destroyed. Or dispose objects that can potentially create some memory leaks, like TextEditingControllers, AnimationControllers. Might be useful as well to persist some data on disk.
inherited
onData(Object key) → void
Called when any future gets completed
onDataReady() → void
Called when all initialization futures are completed
onError(Object? key, dynamic error) → void
Function that is called when a future throws an error
inherited
onInit() → void
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
inherited
onReady() → void
Called 1 frame after onInit(). It is the perfect place to enter navigation events, like snackbar, dialogs, or a new route, or async request.
inherited
ready(Object key) bool
Returns the data ready status by key even if error occurred
inherited
refresh() → void
inherited
refreshData() Future
Run the futures again and refresh
refreshGroup(Object id) → void
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
removeListenerId(Object id, VoidCallback listener) → void
inherited
runBusyFuture<T>(Future<T?> future, {Object? key, bool throwException = false}) Future<T?>
Sets the Controller to busy, runs the future and then sets it to not busy when complete.
inherited
runBusyFutures(List<Future> futures, {Object? key}) Future<bool>
Sets the Controller to busy, runs the futures and then sets it to not busy when complete.
inherited
runBusyRunner<T>(Callback<Future<T?>> runner, {Object? key, bool throwException = false}) Future<T?>
Sets the key to busy, runs the runner and then sets it to not busy when completed.
inherited
runErrorFuture<T>(Future<T?> future, {Object? key, bool throwException = false}) Future<T?>
inherited
runFuture<T>(Future<T?> future, {Object? key, bool throwException = false}) Future<T?>
inherited
runFutureQueue<T>(Callback<Future<T?>> callback, {Object? key, bool throwException = false}) Future<T?>
Sets the key for error logs, runs the future in queue which means next future will not run unless the previous gets completed.
inherited
runnerFor(Object key) FutureCallback?
Returns the runner by key
inherited
runRunner<T>(Callback<Future<T?>> runner, {Object? key, bool throwException = false}) Future<T?>
inherited
setBusy(bool value) → void
Sets the busy status for the Controller and calls notify listeners
inherited
setBusyFor(Object key, bool value) → void
Sets the busy status by key and calls notify listeners
inherited
setData(dynamic data) → void
Sets the data for the Controller
setDataFor(Object key, dynamic value) → void
Sets the data by key
inherited
setError(dynamic error) → void
Sets the error for the Controller
inherited
setErrorFor(Object key, dynamic value) → void
Sets the error state for the key equal to the value passed in and notifies Listeners
inherited
setRunner(FutureCallback runner) → void
Sets the runner for the Controller
inherited
setRunnerFor(Object key, FutureCallback value) → void
Sets the runner by key
inherited
setupStream<T>(Stream<T> stream, {dynamic onData, dynamic onSubscribed, dynamic onError, dynamic onCancel, dynamic transformData}) StreamData
inherited
toString() String
A string representation of this object.
inherited
update([List<Object>? ids, bool condition = true]) → void
Rebuilds GetBuilder each time you call update(); Can take a List of ids, that will only update the matching GetBuilder( id: ), ids can be reused among GetBuilders like group tags. The update will only notify the Widgets, if condition is true.
inherited

Operators

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