ReadonlySignalMixin<T> mixin
Readonly signal mixin for adding addition helper methods
Properties
- autoDispose ↔ bool
-
Throws and error if read after dispose and can be
disposed on last unsubscribe.
getter/setter pair
- debugLabel → String?
-
Debug label for Debug Mode
no setter
- disposed ↔ bool
-
Check if the effect is disposed
getter/setter pair
- globalId → int
-
Global ID of the signal
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Check if a signal value is set (does not subscribe)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → T
-
Compute the current value
no setterinherited
Methods
-
call(
) → T -
Return the value when invoked
inherited
-
dispose(
) → void - Dispose the signal
-
get(
) → T -
Helper method to get the current value
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
void cleanup()) → EffectCleanup - Add a cleanup function to be called when the signal is disposed
-
peek(
) → 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 -
subscribe(
void fn(T value)) → void Function() -
Subscribe to value changes with a dispose function
inherited
-
toJson(
) → dynamic -
Convert value to JSON
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited