onChange method

  1. @override
void onChange(
  1. BlocBase bloc,
  2. Change change
)

Records the transition, then chains to the superclass.

Implementation

@override
void onChange(BlocBase bloc, Change change) {
  _entries.add(
    BlocStateEntry(
      bloc.runtimeType.toString(),
      change.nextState,
      change.currentState,
    ),
  );
  if (_entries.length > maxEntries) _entries.removeAt(0);
  version.value++;
  super.onChange(bloc, change);
}