PersistedBoolSignal class
A PersistedSignal that stores a boolean value.
- Inheritance
-
- Object
- Signal<
bool> - PersistedSignal<
bool> - PersistedBoolSignal
- Available extensions
Constructors
- PersistedBoolSignal(bool val, String key, {SignalsKeyValueStore? store})
-
Creates a new
BoolSignal.
Properties
- autoDispose ↔ bool
-
Throws and error if read after dispose and can be
disposed on last unsubscribe.
getter/setter pairinherited
- debugLabel → String?
-
Debug label for Debug Mode
Debug label for Debug Mode
no setterinherited
- disposed ↔ bool
-
Check if the effect is disposed
getter/setter pairinherited
-
equalityCheck
→ SignalEquality<
bool> -
Optional method to check if to values are the same
no setterinherited
- globalId → int
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- internalValue → bool
-
@internal
Internal getter for the raw value without subscription tracking.
no setterinherited
- isInitialized → bool
-
Check if a signal value is set (does not subscribe)
no setterinherited
- key → String
-
The key to use for storing the value.
finalinherited
- loaded ↔ bool
-
Whether the signal has been loaded from the store.
getter/setter pairinherited
- name → String?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store → SignalsKeyValueStore
-
The store to use for storing the value.
finalinherited
- unwatched → void Function()?
-
finalinherited
- value ↔ bool
-
Gets the current value of the signal.
getter/setter pairinherited
- version ↔ int
-
Version numbers should always be >= 0, because the special value -1 is used
by Nodes to signify potentially unused but recyclable nodes.
getter/setter pairinherited
- watched → void Function()?
-
finalinherited
Methods
-
call(
) → bool -
Return the value when invoked
inherited
-
decode(
String value) → bool -
Decodes the value from a string.
override
-
dispose(
) → void -
Dispose the signal
inherited
-
encode(
bool value) → String -
Encodes the value to a string.
override
-
get(
) → bool -
Helper method to get the current value
inherited
-
init(
) → Future< void> -
Initializes the signal by loading the value from the store.
inherited
-
internalRefresh(
) → bool -
@internal
Refreshes the signal's value internally.
inherited
-
load(
) → Future< bool> -
Loads the value from the store.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDispose(
void cleanup()) → void Function() -
Add a cleanup function to be called when the signal is disposed
inherited
-
overrideWith(
bool val) → Signal< bool> -
Override the current signal with a new value as if it was created with it.
inherited
-
peek(
) → bool -
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< bool> -
Returns a readonly signal
inherited
-
save(
bool value) → Future< void> -
Saves the value to the store.
inherited
-
set(
bool val, {bool force = false}) → bool -
Updates the signal's value by method call.
inherited
-
subscribe(
void fn(bool value)) → void Function() -
Subscribe to value changes with a dispose function
inherited
-
subscribeToNode(
Node node) → void -
@internal
Subscribes this signal to notifications from a given dependency
node.inherited -
toJson(
) → dynamic -
Convert value to JSON
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unsubscribeFromNode(
Node node) → void -
@internal
Unsubscribes this signal from notifications from a given dependency
node.inherited
Operators
-
operator &(
bool other) → bool -
Available on ReadonlySignal<
The logical conjunction ("and") of this andbool> , provided by the BoolSignalExtension extensionother. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator ^(
bool other) → bool -
Available on ReadonlySignal<
The logical exclusive disjunction ("exclusive or") of this andbool> , provided by the BoolSignalExtension extensionother. -
operator |(
bool other) → bool -
Available on ReadonlySignal<
The logical disjunction ("inclusive or") of this andbool> , provided by the BoolSignalExtension extensionother.