Command1<T, A> class
final
A Command that accepts one argument.
- Inheritance
-
- Object
- Signal<
ViewModelState< T> > - Command<
T> - Command1
Constructors
-
Command1(CommandAction1<
T, A> _action) - Creates a Command1 with the provided CommandAction1.
Properties
- autoDispose ↔ bool
-
Throws and error if read after dispose and can be
disposed on last unsubscribe.
getter/setter pairinherited
- completed → bool
-
Whether the action completed successfully.
no setterinherited
- debugLabel → String?
-
Debug label for Debug Mode
finalinherited
- disposed ↔ bool
-
Check if the effect is disposed
getter/setter pairinherited
-
equalityCheck
↔ bool Function(ViewModelState<
T> a, ViewModelState<T> b) -
Optional method to check if to values are the same
getter/setter pairinherited
- error → bool
-
Whether the action completed with an error.
no setterinherited
- globalId → int
-
Global ID of the signal
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
internalValue
→ ViewModelState<
T> -
no setterinherited
- isInitialized → bool
-
Check if a signal value is set (does not subscribe)
no setterinherited
- result → T?
-
The result of the most recent action.
no setterinherited
- running → bool
-
Whether the action is running.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
value
↔ ViewModelState<
T> -
Compute the current value
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
Methods
-
afterCreate(
ViewModelState< T> val) → void -
Internal hook for after a signal is created
inherited
-
beforeUpdate(
ViewModelState< T> val) → void -
Internal hook for after a signal is updated
inherited
-
call(
) → ViewModelState< T> -
Return the value when invoked
inherited
-
clearResult(
) → void -
Clears the most recent action's result.
inherited
-
dispose(
) → void -
Dispose the signal
inherited
-
execute(
A argument) → Future< void> -
Executes the action with the specified
argument. -
get(
) → ViewModelState< T> -
Helper method to get the current value
inherited
-
internalRefresh(
) → bool -
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(
ViewModelState< T> val) → Signal<ViewModelState< T> > -
Override the current signal with a new value as if it was created with it
inherited
-
peek(
) → ViewModelState< 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< ViewModelState< T> > -
Returns a readonly signal
inherited
-
set(
ViewModelState< T> val, {bool force = false}) → bool -
Set the current value by a method
inherited
-
subscribe(
void fn(ViewModelState< 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