1. drawer的实现
drawer: Drawer( child: Column( children: <Widget>[ Row( children: <Widget>[ Expanded( child: UserAccountsDrawerHeader( currentAccountPicture: CircleAvatar( backgroundImage: NetworkImage('https://c-ssl.duitang.com/uploads/item/201712/22/20171222223729_d8HCB.jpeg'), ), accountName: Text('西大街'), accountEmail: Text('data@qq.com'), ), ), ], ), Text('data') ], ), ),
2. 通过点击icon打开drawer
leading: Builder( builder: (context) => GestureDetector( child: Padding( padding: EdgeInsets.all(8.0), child: IconButton( icon: Icon(Icons.person), onPressed: null, ) ), onTap: () => Scaffold.of(context).openDrawer(), ), ),