Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Last active December 14, 2019 06:19
Show Gist options
  • Select an option

  • Save juliuscanute/bfbaea0ebb76aecb1b13bf5f34c92752 to your computer and use it in GitHub Desktop.

Select an option

Save juliuscanute/bfbaea0ebb76aecb1b13bf5f34c92752 to your computer and use it in GitHub Desktop.
Navigation Setup
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
//...
child: MaterialApp(
navigatorKey: NavigatorHolder.navigatorKey,
home: MyHomePage(),
routes: {
'/all-emotions': (BuildContext context) => MyHomePage(),
'/list-emotions': (BuildContext context) => EmotionsList(),
'/add-emotion': (BuildContext context) => AddDetail(),
'/view-saved-emotion': (BuildContext context) => ViewDetail(),
},
),
);
}
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment