PersistedPersistedEnumSignal<T extends Enum> class
A PersistedSignal
that stores a nullable enum value.
- Inheritance
-
- Object
- Signal<
T?> - PersistedSignal<
T?> - PersistedPersistedEnumSignal
- Available extensions
Constructors
-
PersistedPersistedEnumSignal.new(T? val, String key, List<
T> values, {SignalsKeyValueStore? store}) -
Creates a new
PersistedEnumSignal
.
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
finalinherited
- disposed ↔ bool
-
Check if the effect is disposed
getter/setter pairinherited
- equalityCheck ↔ bool Function(T? a, T? b)
-
Optional method to check if to values are the same
getter/setter pairinherited
- globalId → int
-
Global ID of the signal
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
Available on ReadonlySignal<
A numeric identifier for the enumerated value.Enum> , provided by the EnumSignalExtension extensionno setter - internalValue → T?
-
no setterinherited
- isInitialized → bool
-
Check if the value is set and not a lazy signal
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
-
Available on ReadonlySignal<
The name of the enum value.Enum> , provided by the EnumSignalExtension extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store → SignalsKeyValueStore
-
The store to use for storing the value.
finalinherited
- value ↔ T?
-
Compute the current value
getter/setter pairinherited
-
values
→ List<
T> -
The possible values of the enum.
final
- 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
Methods
-
afterCreate(
T? val) → void -
Internal hook for after a signal is created
inherited
-
beforeUpdate(
T? val) → void -
Internal hook for after a signal is updated
inherited
-
call(
) → T? -
Return the value when invoked
inherited
-
decode(
String value) → T? -
Decodes the value from a string.
override
-
dispose(
) → void -
Dispose the signal
inherited
-
encode(
T? value) → String -
Encodes the value to a string.
override
-
get(
) → T? -
Helper method to get the current value
inherited
-
init(
) → Future< void> -
Initializes the signal by loading the value from the store.
inherited
-
internalRefresh(
) → bool -
inherited
-
load(
) → Future< T?> -
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(
T? val) → Signal< T?> -
Override the current signal with a new value as if it was created with it
inherited
-
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
inherited
-
save(
T? value) → Future< void> -
Saves the value to the store.
inherited
-
set(
T? val, {bool force = false}) → bool -
Set the current value by a method
inherited
-
subscribe(
void fn(T? value)) → void Function() -
Subscribe to value changes with a dispose function
inherited
-
subscribeToNode(
Node node) → void -
inherited
-
toJson(
) → dynamic -
Convert value to JSON
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unsubscribeFromNode(
Node node) → void -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited