TimerSignal class

Emit recurring TimerSignalEvent aka AsyncSignal

Inheritance
Implemented types

Constructors

TimerSignal({required Duration every, String debugLabel = 'Timer', bool? cancelOnError})

Properties

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

Methods

addStream(Stream<TimerSignalEvent> stream, {bool? cancelOnError, void onDone()?}) → void
Add a stream to listen to for updating the signal.
inherited
call() AsyncState<TimerSignalEvent>
Return the value when invoked
inherited
dispose() → void
inherited
forceUpdate(AsyncState<TimerSignalEvent> val) → void
Should only be called to update the value of a signal if checks for equality have already been made.
inherited
get() AsyncState<TimerSignalEvent>
inherited
init() → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDispose(SignalCleanup cleanup) → void
inherited
peek() AsyncState<TimerSignalEvent>
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
inherited
resetStream(Stream<TimerSignalEvent> stream, {bool? cancelOnError, void onDone()?}) → void
Reset the signal and add a new stream to listen to for updating the signal.
inherited
set(AsyncState<TimerSignalEvent> value) → void
Set the current value
inherited
setError(Object error, [StackTrace? stackTrace]) → void
inherited
setLoading([AsyncState<TimerSignalEvent>? state]) → void
inherited
setValue(TimerSignalEvent value) → void
inherited
subscribe(void fn(AsyncState<TimerSignalEvent> value)) EffectCleanup
Subscribe to value changes
inherited
toJson() AsyncState<TimerSignalEvent>
Convert value to JSON
inherited
toString() String
A string representation of this object.
inherited

Operators

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