updateState method

CubitEntity updateState(
  1. CubitStateEntity state
)

Implementation

CubitEntity updateState(CubitStateEntity state) {
  return copyWith(
    currentState: state.id,
    stateHistory: [...stateHistory, state],
  );
}