From 46b60773e8455884b1da5d2559731fb60ca975d7 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 3 Nov 2016 17:26:36 -0700 Subject: [PATCH] Update Gallery usage of Scaffold.of (#6639) --- examples/flutter_gallery/lib/gallery/home.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/flutter_gallery/lib/gallery/home.dart b/examples/flutter_gallery/lib/gallery/home.dart index 48c7df8f38..ea1946b889 100644 --- a/examples/flutter_gallery/lib/gallery/home.dart +++ b/examples/flutter_gallery/lib/gallery/home.dart @@ -99,7 +99,7 @@ class GalleryHome extends StatefulWidget { } class GalleryHomeState extends State with SingleTickerProviderStateMixin { - static final Key _homeKey = new ValueKey('Gallery Home'); + static final GlobalKey _scaffoldKey = new GlobalKey(); static final GlobalKey _scrollableKey = new GlobalKey(); AnimationController _controller; @@ -148,7 +148,7 @@ class GalleryHomeState extends State with SingleTickerProviderState Widget build(BuildContext context) { final double statusBarHeight = MediaQuery.of(context).padding.top; Widget home = new Scaffold( - key: _homeKey, + key: _scaffoldKey, scrollableKey: _scrollableKey, drawer: new GalleryDrawer( useLightTheme: config.useLightTheme, @@ -166,7 +166,7 @@ class GalleryHomeState extends State with SingleTickerProviderState background: new Builder( builder: (BuildContext context) { return new _AppBarBackground( - animation: Scaffold.of(context)?.appBarAnimation + animation: _scaffoldKey.currentState.appBarAnimation ); } )