You probably want to do something like this: (inside your Scaffold
)
appBar: AppBar(leading: Row(children:[FirstIcon(), SecondIcon(),],),
To open the Drawer
, you will have to do this: (in your widget's build
method):
/// create a Drawer key
final GlobalKey<ScaffoldState> _drawerKey = GlobalKey();
/// this function opens the drawer
void _openDrawer()=>_drawerKey.currentState.openDrawer();
/// then use it to open the Drawer
Scaffold(appBar: AppBar(leading: Row(children: <Widget>[IconButton(onPressed:_openDrawer, icon:Icon(Icons.hamburger,),), SecondIcon(),],),
),);
Edit:
Don't forget to add the _drawerKey
to your Drawer
. Like this:
Drawer(key: _drawerKey, child: YourWidget(),),
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…