setState method

void setState(
  1. T newState
)

Set the state of this atom. This will emit an event on the stateStream stream. newState the state to be set as this Atom's state.

Implementation

void setState(T newState) {
  _state = newState;
  _controller.add(_state);
}