AsyncSignal<T> class

A compound Signal that wraps a Stream or Future

Inheritance
Implemented types

Constructors

AsyncSignal(AsyncState<T> value, {String? debugLabel})

Properties

brand Symbol
finalinherited
debugLabel String?
Debug label for Debug Mode
finalinherited
future Future<T>
The future of the signal completer
no setter
globalId int
Global ID of the signal
finalinherited
hashCode int
The hash code for this object.
no setterinherited
initialValue AsyncState<T>
Get the value the signal was created with
no setterinherited
isCompleted bool
Returns true if the signal is completed an error or data
no setter
previousValue AsyncState<T>
Get the last value before the last update or the initial value
no setterinherited
requireValue → T
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value AsyncState<T>
Compute the current value
getter/setter pairinherited-setter

Methods

call() AsyncState<T>
Return the value when invoked
inherited
dispose() → void
inherited
forceUpdate(AsyncState<T> val) → void
Should only be called to update the value of a signal if checks for equality have already been made.
inherited
get() AsyncState<T>
inherited
init() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose(SignalCleanup cleanup) → void
inherited
peek() AsyncState<T>
In the rare instance that you have an effect that should write to another signal based on the previous value, but you don't want the effect to be subscribed to that signal, you can read a signals's previous value via signal.peek().
inherited
reset() → void
set(AsyncState<T> value) → void
Set the current value
inherited
setError(Object error, [StackTrace? stackTrace]) → void
setLoading([AsyncState<T>? state]) → void
setValue(T value) → void
subscribe(void fn(AsyncState<T> value)) EffectCleanup
Subscribe to value changes
inherited
toJson() AsyncState<T>
Convert value to JSON
inherited
toString() String
A string representation of this object.
inherited

Operators

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