bloc library


Bloc<Event, State>
Takes a Stream of Events as input and transforms them into a Stream of States as output.
Handles events from all blocs which are delegated by the BlocSupervisor.
Oversees all blocs and delegates responsibilities to the BlocDelegate.
Transition<Event, State>
Occurs when an event is added after mapEventToState has been called but before the bloc's state has been updated. A Transition consists of the currentState, the event which was added, and the nextState.


TransitionFunction<Event, State> = Stream<Transition<Event, State>> Function(Event)
Signature for a mapper function which takes an Event as input and outputs a Stream of Transition objects.

Exceptions / Errors

Exception thrown in debug mode when an unhandled error occurs within a bloc.