Change<State> constructor

const Change<State>({
  1. required State currentState,
  2. required State nextState,
})

Creates a new change object with the given states.

Parameters:

  • currentState: The current state value before the change
  • nextState: The next state value that will be applied

Example:

final change = Change(currentState: 'old', nextState: 'new');

Implementation

const Change({required this.currentState, required this.nextState});