SignalValueNotifier<T> class

Inheritance
Implemented types
Available extensions

Constructors

SignalValueNotifier(T val, {String? debugLabel, bool autoDispose = false})
SignalValueListenable from value
SignalValueNotifier.fromSignal(Signal<T> val)
SignalValueNotifier from Signal
SignalValueNotifier.fromValueNotifier(ValueNotifier<T> val, {String? debugLabel, bool autoDispose = false})
SignalValueNotifier from ValueNotifier
SignalValueNotifier.merge(ValueNotifier<T> notifier, Signal<T> source)
Merge ValueNotifier and Signal

Properties

autoDispose bool
Throws and error if read after dispose and can be disposed on last unsubscribe.
no setterinherited
debugLabel String?
Debug label for Debug Mode
no setterinherited
disposed bool
Returns true if dispose has been called and will throw and error on value read
getter/setter pairinherited
equalityCheck bool Function(T a, T b)
Optional method to check if to values are the same
getter/setter pairoverride
globalId int
Global ID of the signal
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setteroverride
hasTargets bool
Check if there are any targets attached
no setterinherited
initialValue → T
Value that the signal was created with
no setterinherited
isInitialized bool
Check if the signal is lazy and has not had a value set
no setterinherited
notifier ValueNotifier<T>
Internal value notifier
finalinherited
previousValue → T?
Previous value that was set before the current
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source Signal<T>
Internal source signal
finalinherited
targets Iterable<SignalListenable>
@internal for testing getter to track all the effects currently effected in the signal
no setterinherited
value ↔ T
Compute the current value
getter/setter pairinherited-getteroverride-setter
version int
Version number is used to track changes and will increment for every set
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object notifies its listeners.
inherited
call() → T
Return the value when invoked
inherited
dispose() → void
Dispose the signal
inherited
forceUpdate([T? val]) → void
Force update a value
override
get() → T
Get the current value
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
override
onDispose(void cleanup()) EffectCleanup
Add a cleanup function to be called when the signal is disposed
inherited
overrideWith(T value) Signal<T>
Override the current signal with a new value as if it was created with it
override
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
readonly() ReadonlySignal<T>
Returns a readonly signal
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that the object notifies.
inherited
set(T val, {bool force = false}) bool
Update the current value.
override
subscribe(void fn(T value)) EffectCleanup
Subscribe to value changes
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