skip to Main Content

How to open dialog above all screens in flutter, when using go_router?

final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>(); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return BlocProvider<InactivityCubit>( create: (_) => inject<InactivityCubit>(), child: MaterialApp.router( builder: (context, widget) { return Container( child: BlocListener<InactivityCubit, InactivityState>( listener: (context, state) => state.whenOrNull( showDialog:…

VIEW QUESTION
Back To Top
Search