Bloc<T> constructor

Bloc<T>(
  1. T initialState,
  2. Map<Type, Future<T> Function(T state(), Object, void updateState(T), Object? pageScope)> _handlersByEvent,
  3. Map<Type, T Function(T state, Object event)> _syncHandlersByEvent, {
  4. Object? pageScope,
})

You can construct a Bloc here, but you're probably better off using a BlocBuilder

Implementation

Bloc(
  this.initialState,
  this._handlersByEvent,
  this._syncHandlersByEvent, {
  this.pageScope,
}) : _state = initialState;