Change<State> class
Represents a state change with the current and next state values.
Change is used to encapsulate state transitions in Surge, providing information about both the current state and the state that will be applied. This is useful for change notifications, logging, and validation.
Example:
final change = Change(currentState: 0, nextState: 1);
print('Changing from ${change.currentState} to ${change.nextState}');
Constructors
- Change({required State currentState, required State nextState})
-
Creates a new change object with the given states.
const
Properties
- currentState → State
-
The current state value before the change.
final
- hashCode → int
-
Returns the hash code for this Change object.
no setteroverride
- nextState → State
-
The next state value that will be applied.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of this Change object.
override
Operators
-
operator ==(
Object other) → bool -
Compares two Change objects for equality.
override