Called whenever a Bloc is closed.
onClose is called just before the Bloc is closed
and indicates that the particular instance will no longer
emit new states.
Called whenever a Bloc is instantiated.
In many cases, a cubit may be lazily instantiated and
onCreate can be used to observe exactly when the cubit
instance is created.
Called whenever an error is thrown in any Bloc or Cubit.
The stackTrace argument may be StackTrace.empty if an error
was received without a stack trace.
Called whenever a transition occurs in any bloc with the given bloc
and transition.
A transition occurs when a new event is added
and a new state is emitted from a corresponding EventHandler.
onTransition is called before a bloc's state has been updated.