公告
财富商城
积分规则
提问
发文
2020-01-20 12:35发布
ら.Afraid
If I have an AppBar like this:
How do I add a clickable icon to it like this?
You can add an icon to the AppBar by adding an IconButton widget to the actions list of the AppBar.
actions
AppBar( title: Text('My App'), actions: <Widget>[ IconButton( icon: Icon( Icons.settings, color: Colors.white, ), onPressed: () { // do something }, ) ], ),
最多设置5个标签!
How to add an icon to the AppBar
You can add an icon to the AppBar by adding an IconButton widget to the
actions
list of the AppBar.See also