Bloc: I can longer find BlocDelegate class

Created on 6 Aug 2020  ·  2Comments  ·  Source: felangel/bloc

I can no longer find the BlocDelegate class after upgrading to version 6. What has replaced it, if there is any replacement. I used it like so previously:

class SimpleBlocDelegate extends BlocDelegate {
@override
void onEvent(Bloc bloc, Object event) {
print('onEvent $event');
super.onEvent(bloc, event);
}

@override
onTransition(Bloc bloc, Transition transition) {
print('onTransition $transition');
super.onTransition(bloc, transition);
}

@override
void onError(Bloc bloc, Object error, StackTrace stackTrace) {
print('onError $error');
super.onError(bloc, error, stackTrace);
}
}

question

All 2 comments

Hi @mwenechac 👋

It was renamed to BlocObserver. You can check out the migration guide for more details.

If you encounter additional problems migrating your code, feel free to comment and I'll help you further 👍

Great. Thanks

On Thu, Aug 6, 2020, 18:25 Felix Angelov notifications@github.com wrote:

Closed #1583 https://github.com/felangel/bloc/issues/1583.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/felangel/bloc/issues/1583#event-3629847975, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AMAHICAA3X2KN75LV24Y76TR7LKPXANCNFSM4PWJKPKQ
.

Was this page helpful?
0 / 5 - 0 ratings