Stated<T> class
abstract
A Custom ValueListenable implementation Can be used in with ListenableBuilder or StatedBuilder The value is never assigned directly, but rather built using build
- Implemented types
- Mixed in types
- Available Extensions
Constructors
- Stated()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runningTasks → int
-
Concurrently running tasks count
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
The current value of the Stated.
If value is null, build is called to build the value.
no setteroverride
Methods
-
addDispose(
VoidCallback onDispose) → void -
Registers callback to be executed on dispose of Disposer in reversed insert order
inherited
-
addListener(
VoidCallback callback) → void -
Register a closure to be called when the object notifies its listeners.
override
-
build(
) → T - This methods needs to be overridden to produce value.
-
cancelTasks(
) → void -
Cancels all enqueued tasks
inherited
-
dispose(
) → void -
override
-
disposeTasks(
) → void -
inherited
-
enqueue(
TaskDelegate task) → Future< void> -
Enqueues
task
for execution and return the completion future Throws: TaskCancelledExceptioninherited -
enqueueCancellable(
CancellableTaskDelegate task) → Future< void> -
Enqueues
task
for execution and return the completion future Also provides the CancellationToken to the closure Throws: TaskCancelledExceptioninherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
VoidCallback callback) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
override
-
setState(
[VoidCallback? callback]) → void -
After the
callback
it produces the value. Notifies listeners only when value changes. -
toString(
) → String -
A string representation of this object.
inherited
-
waitIdle(
) → Future< void> -
Provides a future that will complete when the current queue completes
Throws: TaskCancelledException
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited