State<T> class
abstract
The base class to represent State in an object.
This is the smallest representation of state in the Pheasant Framework. It is a generic class containing base functionality used to represent how state is controlled and managed in an application.
In this base class, we get to see a small representation of state management via the implementation of initValue, currentValue and previousValue, as well as the function change.
This class is extended, implemented and used in other classes for state control, and is directly used by StateObject, where most of the defined functions are implemented.
- Mixed-in types
- Implementers
Constructors
- State({required T initValue, T? newValue})
Properties
- currentValue → T
-
The current value of the variable
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- initValue → T
-
The initial value of the variable.
final
- previousValue → T
-
The previous value of the variable
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
change(
T newValue, {StateChange< T> ? stateChange}) → void - Function used to change state.
-
freeze(
) → void -
Function used to freeze state.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
) → void -
Function used to refresh or reload state.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unfreeze(
) → void -
Function used to unfreeze state.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited