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.
This commit is contained in:
Ian Hickson
2017-03-01 22:07:37 -08:00
committed by Adam Barth
parent 5271546794
commit 2f002885cc

View File

@@ -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<OrderPage> {
static final GlobalKey<ScaffoldState> scaffoldKey = new GlobalKey<ScaffoldState>(debugLabel: 'Shrine Order');
GlobalKey<ScaffoldState> scaffoldKey;
@override
void initState() {
super.initState();
scaffoldKey = new GlobalKey<ScaffoldState>(debugLabel: 'Shrine Order ${config.order}');
}
Order get currentOrder => ShrineOrderRoute.of(context).order;