Called whenever an error is thrown in any bloc with the given bloc,
error, and stackTrace.
The stackTrace argument may be null if the state stream received
an error without a stackTrace.
A great spot to add universal error handling.
Called whenever a transition occurs in any bloc with the given bloc
A transition occurs when a new event is added and mapEventToState
onTransition is called before a bloc's state has been updated.
A great spot to add universal logging/analytics.