I'm providing bloc at top of all view to access at globally. When I'm doing logout and re-login without closing app, event not called because it is already initiate. Here, I want to refresh bloc on logout, so that FetchList and UpdateCount events got called when user logged In without closing app. How I can achieve this?
class DemoApp extends StatelessWidget {
const DemoApp({super.key});
@override
Widget build(BuildContext context) {
return MultiBlocProvider(
providers: [
BlocProvider(create: (_) => AppBloc()..add(const UpdateFcmToken())),
BlocProvider(
create: (_) => getIt<ListBloc>()
..add(const FetchList())
..add(const UpdateCount()),
),
],
child: const AppView(),
);
}
}