File tree 1 file changed +3
-3
lines changed
examples/flutter_gallery/lib/gallery
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ class GalleryHome extends StatefulWidget {
99
99
}
100
100
101
101
class GalleryHomeState extends State <GalleryHome > with SingleTickerProviderStateMixin {
102
- static final Key _homeKey = new ValueKey < String >( 'Gallery Home' );
102
+ static final GlobalKey < ScaffoldState > _scaffoldKey = new GlobalKey < ScaffoldState >( );
103
103
static final GlobalKey <ScrollableState > _scrollableKey = new GlobalKey <ScrollableState >();
104
104
105
105
AnimationController _controller;
@@ -148,7 +148,7 @@ class GalleryHomeState extends State<GalleryHome> with SingleTickerProviderState
148
148
Widget build (BuildContext context) {
149
149
final double statusBarHeight = MediaQuery .of (context).padding.top;
150
150
Widget home = new Scaffold (
151
- key: _homeKey ,
151
+ key: _scaffoldKey ,
152
152
scrollableKey: _scrollableKey,
153
153
drawer: new GalleryDrawer (
154
154
useLightTheme: config.useLightTheme,
@@ -166,7 +166,7 @@ class GalleryHomeState extends State<GalleryHome> with SingleTickerProviderState
166
166
background: new Builder (
167
167
builder: (BuildContext context) {
168
168
return new _AppBarBackground (
169
- animation: Scaffold . of (context) ? .appBarAnimation
169
+ animation: _scaffoldKey.currentState .appBarAnimation
170
170
);
171
171
}
172
172
)
You can’t perform that action at this time.
0 commit comments