onTransition method

  1. @override
void onTransition(
  1. Bloc bloc,
  2. Transition transition

Called whenever a transition occurs in any bloc with the given bloc and transition. A transition occurs when a new event is added and mapEventToState executed. onTransition is called before a bloc's state has been updated.


void onTransition(Bloc bloc, Transition transition) {
  super.onTransition(bloc, transition);
  if (status == RemoteDevToolsStatus.started) {
    _relay('ACTION', bloc, transition.nextState, transition.event);