updateState method

T? updateState(
  1. T? previousState
)

The function to update the state. By default, the function will return null. This is useful when you need to do quick state updates without needing a dedicated handler for a command. The function will receive the previous state as an argument and should return the new state.

Implementation

T? updateState(T? previousState) {
  return null;
}