Commit 479c7da9 authored by Matt Perry's avatar Matt Perry

Add a 'Return to Gallery' drawer option to Pesto. (#4472)

* Add a 'Return to Gallery' drawer option to Pesto.

BUG=https://github.com/flutter/flutter/issues/4402

* oops
parent fcd68c8a
......@@ -168,7 +168,17 @@ class _PestoDemoState extends State<PestoDemo> {
child: new Text('Favorites'),
selected: config.showFavorites,
onPressed: () { _showFavorites(context); }
)
),
new Divider(),
new DrawerItem(
child: new Text('Return to Gallery'),
onPressed: () {
Navigator.openTransaction(context, (NavigatorTransaction transaction) {
transaction.pop(); // Close the Drawer
transaction.pop(); // Go back to the gallery
});
}
),
]
)
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment