Bloc<Event extends Object?, State extends Object?> constructor

Bloc<Event extends Object?, State extends Object?>(
  1. State initialState
)

Takes a Stream of Events as input and transforms them into a Stream of States as output.

Implementation

Bloc(State initialState) : _state = initialState {
  _bindEventsToStates();
  _observer = _ObserverManager.observer?..onCreate(this);
}