Remove Scaffold scrollableKey use in gallery demos (#3406)

* Remove Scaffold scrollable_key demo usage
This commit is contained in:
Hans Muller
2016-04-19 16:31:11 -07:00
parent 6e0c76f4ba
commit c7e2e8ae81
4 changed files with 4 additions and 9 deletions

View File

@@ -77,7 +77,6 @@ class FlexibleSpaceDemo extends StatefulWidget {
class FlexibleSpaceDemoState extends State<FlexibleSpaceDemo> {
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
final double _appBarHeight = 256.0;
final Key _scrollableKey = new UniqueKey();
AppBarBehavior _appBarBehavior = AppBarBehavior.scroll;
@override
@@ -90,7 +89,6 @@ class FlexibleSpaceDemoState extends State<FlexibleSpaceDemo> {
),
child: new Scaffold(
key: _scaffoldKey,
scrollableKey: _scrollableKey,
appBarBehavior: _appBarBehavior,
appBar: new AppBar(
expandedHeight: _appBarHeight,
@@ -132,7 +130,6 @@ class FlexibleSpaceDemoState extends State<FlexibleSpaceDemo> {
)
),
body: new Block(
scrollableKey: _scrollableKey,
padding: new EdgeInsets.only(top: _appBarHeight + statusBarHeight),
children: <Widget>[
new _ContactCategory(

View File

@@ -45,7 +45,6 @@ class TabsDemoState extends State<TabsDemo> {
});
},
child: new Scaffold(
scrollableKey: _selectedPage.key,
appBarBehavior: AppBarBehavior.under,
appBar: new AppBar(
title: new Text('Tabs and scrolling'),

View File

@@ -75,7 +75,6 @@ class GalleryHome extends StatefulWidget {
class GalleryHomeState extends State<GalleryHome> {
final Key _homeKey = new ValueKey<String>("Gallery Home");
final Key _listKey = new ValueKey<String>("Gallery List");
@override
Widget build(BuildContext context) {
@@ -98,12 +97,10 @@ class GalleryHomeState extends State<GalleryHome> {
background: new GalleryHeader()
)
),
scrollableKey: _listKey,
appBarBehavior: AppBarBehavior.under,
body: new TwoLevelList(
padding: new EdgeInsets.only(top: _kFlexibleSpaceMaxHeight + statusBarHight),
type: MaterialListType.oneLine,
scrollableKey: _listKey,
children: <Widget>[
new TwoLevelSublist(
leading: new Icon(icon: Icons.star),