ReadyMixin mixin

Properties

hashCode int
The hash code for this object.
no setterinherited
ready Future<bool>
Waits until the state is ready. Returns true on ready, and false on error. If initialisation hasn't started yet, this will start it. Override readyTimeout to change the time between checks (default 50ms).
no setter
readyError Object?
The error that caused the state to be ReadyState.error.
getter/setter pair
readyState ReadyState
The current initialisation state.
no setter
readyTimeout Duration
Override this to change the waiting time between checks in ready.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

init() → void
Call this to start initialisation. Override onInit to provide your initialisation logic.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onInit() → void
Override this with your initialisation code. Make sure you end with setReady or setError.
setError([Object? error]) → void
Sets the state to ReadyState.error. Optionally provide an error, which will be stored in readyError.
setReady() → void
Sets the state to ReadyState.ready.
setReadyState(ReadyState state) → void
setWorking() → void
Sets the state to ReadyState.working.
toString() String
A string representation of this object.
inherited

Operators

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