Merge pull request #4953 from flutter/drawer-header-update

Updated DrawerHeader to new spec.
This commit is contained in:
Dragoș Tiselice
2016-07-21 11:17:18 -07:00
committed by GitHub
10 changed files with 296 additions and 33 deletions

View File

@@ -126,7 +126,7 @@ class CardCollectionState extends State<CardCollection> {
child: new IconTheme(
data: const IconThemeData(color: Colors.black),
child: new Block(children: <Widget>[
new DrawerHeader(content: new Center(child: new Text('Options'))),
new DrawerHeader(child: new Center(child: new Text('Options'))),
buildDrawerCheckbox("Make card labels editable", _editable, _toggleEditable),
buildDrawerCheckbox("Snap fling scrolls to center", _snapToCenter, _toggleSnapToCenter),
buildDrawerCheckbox("Fixed size cards", _fixedSizeCards, _toggleFixedSizeCards),

View File

@@ -85,7 +85,7 @@ class PageableListAppState extends State<PageableListApp> {
Widget _buildDrawer() {
return new Drawer(
child: new Block(children: <Widget>[
new DrawerHeader(content: new Center(child: new Text('Options'))),
new DrawerHeader(child: new Center(child: new Text('Options'))),
new DrawerItem(
icon: new Icon(Icons.more_horiz),
selected: scrollDirection == Axis.horizontal,