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:
@@ -121,7 +121,8 @@ class _PestoDemoState extends State<PestoDemo> {
|
||||
child: new Block(
|
||||
children: <Widget>[
|
||||
new DrawerHeader(
|
||||
content: new Column(
|
||||
child: new Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
new Container(
|
||||
decoration: new BoxDecoration(
|
||||
@@ -131,7 +132,7 @@ class _PestoDemoState extends State<PestoDemo> {
|
||||
width: 72.0,
|
||||
height: 72.0,
|
||||
padding: const EdgeInsets.all(2.0),
|
||||
margin: const EdgeInsets.only(bottom: 8.0),
|
||||
margin: const EdgeInsets.only(bottom: 16.0),
|
||||
child: new ClipOval(
|
||||
child: new Image(
|
||||
image: new AssetImage(_kUserImage),
|
||||
|
||||
@@ -49,7 +49,7 @@ class GalleryDrawer extends StatelessWidget {
|
||||
child: new Block(
|
||||
children: <Widget>[
|
||||
new DrawerHeader(
|
||||
content: new Center(child: new Text('Flutter gallery'))
|
||||
child: new Center(child: new Text('Flutter gallery'))
|
||||
),
|
||||
new DrawerItem(
|
||||
icon: new Icon(Icons.brightness_5),
|
||||
|
||||
@@ -124,7 +124,7 @@ class StockHomeState extends State<StockHome> {
|
||||
Widget _buildDrawer(BuildContext context) {
|
||||
return new Drawer(
|
||||
child: new Block(children: <Widget>[
|
||||
new DrawerHeader(content: new Center(child: new Text('Stocks'))),
|
||||
new DrawerHeader(child: new Center(child: new Text('Stocks'))),
|
||||
new DrawerItem(
|
||||
icon: new Icon(Icons.assessment),
|
||||
selected: true,
|
||||
|
||||
Reference in New Issue
Block a user