Updated DrawerHeader and added UserAccountDrawer.

Removed old Stack layout and added a simple-to-extend interface for the
new drawer header. Also added a specialized UserAccountsDrawerHeader
consistent with Material Design guidelines.
This commit is contained in:
Dragos Tiselice
2016-07-18 14:24:06 -07:00
parent 5f7b89990e
commit 65e77142e9
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,