From 2f002885cca49b967f8a863acb0f96afd88676fd Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 1 Mar 2017 22:07:37 -0800 Subject: [PATCH] Allow two shrine order pages to be on the screen at the same time. (#8507) This happens when, for instance, you go back then forward quickly. --- .../flutter_gallery/lib/demo/shrine/shrine_order.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/flutter_gallery/lib/demo/shrine/shrine_order.dart b/examples/flutter_gallery/lib/demo/shrine/shrine_order.dart index 3b47c48b9a..c5166698b3 100644 --- a/examples/flutter_gallery/lib/demo/shrine/shrine_order.dart +++ b/examples/flutter_gallery/lib/demo/shrine/shrine_order.dart @@ -134,7 +134,13 @@ class OrderPage extends StatefulWidget { /// arranged in two columns. Enables the user to specify a quantity and add an /// order to the shopping cart. class _OrderPageState extends State { - static final GlobalKey scaffoldKey = new GlobalKey(debugLabel: 'Shrine Order'); + GlobalKey scaffoldKey; + + @override + void initState() { + super.initState(); + scaffoldKey = new GlobalKey(debugLabel: 'Shrine Order ${config.order}'); + } Order get currentOrder => ShrineOrderRoute.of(context).order;