flutter - 如何在我的应用栏上添加抽屉和搜索图标

标签 flutter

我是 Flutter 和探索它的新手。我已经有一个应用栏,但我似乎无法弄清楚如何在其上正确显示抽屉图标和搜索图标。我希望它看起来像下图所示的 gmail 应用栏。我正在开发公司帮助台移动应用程序。谢谢。

gmail app bar

最佳答案

按照 flutter docs 中的说明进行操作.

new AppBar( 
    title: new Text('My Fancy Dress'), 
    actions: <Widget>[ 
        new IconButton( icon: new Icon(Icons.playlist_play), tooltip: 'Air it', onPressed: _airDress, ),],
    leading: <Widget>[
        new IconButton( icon: new Icon(Icons.playlist_play), tooltip: 'Air it', onPressed: _airDress, ),
], )

领导下的小部件是抽屉, Action 下的小部件是搜索图标按钮。

关于flutter - 如何在我的应用栏上添加抽屉和搜索图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51093307/

相关文章:

flutter - 无法从Firestore文档中删除字段(Flutter)

flutter - 如何监听字符串变量的变化并在发生变化时执行操作?

flutter - 再次构建后,ListVIew 不会滚动到正确的偏移位置

flutter - 跨应用程序标准化大小,但仍使用 `const`

android - SDK 更新后 Flutter 无法运行

Flutter - 自动调整 AlertDialog 大小以适应列表内容

flutter - 如何根据bool值在Auth屏幕和Home屏幕之间切换?

flutter - 从 DropdownItems 中选择值后,DropdownButton 值未更新。如何使用 selectedValue 更新默认值?

ios - 使用 firebase-auth 时在 ios 上构建应用程序会导致 flutter 问题

ios - Android Studio Flutter 调试时禁用断点