-
-
Save ijoschek/5c33f15220ee37212ac64ceb9395470d to your computer and use it in GitHub Desktop.
flutter_nav_tut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
class _MainPageState extends State<MainPage> { | |
// ... | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
// ... | |
drawer: Drawer( | |
child: ListView( | |
children: <Widget>[ | |
// ... | |
ListTile( | |
title: Text('MaterialPageRoute'), | |
trailing: Icon(Icons.arrow_forward), | |
onTap: () { | |
Navigator.of(context).pop(); | |
Navigator.push( | |
context, | |
MaterialPageRoute( | |
builder: (BuildContext context) => | |
NewPage())); | |
}, | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment