updateState method

void updateState(
  1. S state
)

Updates the cubit's state.

  • state: The new state to emit.

Implementation

void updateState(S state) {
  if (!isClosed) {
    emit(state);
  }
}