bloc library Null safety


Bloc<Event, State>
Takes a Stream of Events as input and transforms them into a Stream of States as output.
An interface for the core functionality implemented by both Bloc and Cubit.
An interface for observing the behavior of Bloc instances.
A Change represents the change from one State to another. A Change consists of the currentState and nextState.
A Cubit is similar to Bloc but has no notion of events and relies on methods to emit new states. [...]
Transition<Event, State>
A Transition is the change from one state to another. Consists of the currentState, an event, and the nextState.


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

Exceptions / Errors

Exception thrown when an unhandled error occurs within a bloc. [...]