Skip to content

Instantly share code, notes, and snippets.

@pedromassango
Last active November 2, 2019 09:18
Show Gist options
  • Select an option

  • Save pedromassango/9eccfcd7d2b5806b63c3add7efab34c3 to your computer and use it in GitHub Desktop.

Select an option

Save pedromassango/9eccfcd7d2b5806b63c3add7efab34c3 to your computer and use it in GitHub Desktop.
class _MyAppState extends State<MyApp> {
final GlobalKey<NavigatorState> _navigatorKey = GlobalKey();
@override
Widget build(BuildContext context) {
return BlocProvider<NavigatorBloc>(
bloc: NavigatorBloc(navigatorKey: _navigatorKey),
child: MaterialApp(
navigatorKey: _navigatorKey,
title: 'My App',
home: HomePage(),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment