StateChange<T> class
Class used to represent state changes in an application.
Whenever state changes, the changes that occur during the state transition are encapsulated in a StateChange class.
This class encapsulates data such as the Event that caused this change, the StateTarget, and the newValue created from this state change.
This class is not used directly in the application, but used as a means of state change transmission in a component state object like AppState.
Constructors
- StateChange({required Event? triggerEvent, required T? newValue, dynamic stateChanger(dynamic)?, StateTarget? target})
- StateChange.empty()
- Constructor to initalise "no change" or an empty state change.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- newValue ↔ T?
-
The new value of the variable changed during the state change
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stateChanger ↔ dynamic Function(dynamic)?
-
getter/setter pair
- target → StateTarget?
-
The target of the state change.
no setter
- targetless → bool
-
Whether the state change has a target or not
no setter
- triggerEvent ↔ Event?
-
The event that triggered the state change
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited