Skip to content

Instantly share code, notes, and snippets.

@ijoschek ijoschek/.\lib\main.dart Secret
Last active Apr 7, 2019

Embed
What would you like to do?
flutter_nav_tut
// ...
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
You can’t perform that action at this time.