Flutter-AppBar

2019-12-29  本文已影响0人  梦幽辰

导航栏

centerTitle

居中AppBar中的title


centerTitle
appBar: AppBar(
  centerTitle: true,
)

leading

会在导航栏最左侧出现一个图标

leading: IconButton(
  icon: Icon(Icons.menu),
  tooltip: 'Navigration',
  onPressed: ()=>{
  debugPrint('Navigration button is pressed'),
  },
),
leading

actions

actions: <Widget>[
  IconButton(
    icon: Icon(Icons.search),
    tooltip: 'Navigration',
    onPressed: ()=>{
        debugPrint('Search button is pressed'),
    },
  ),
  IconButton(
    icon: Icon(Icons.more_horiz),
    tooltip: 'Navigration',
    onPressed: ()=>{
      debugPrint('more_horiz button is pressed'),
    },
  ),
],
actions
上一篇下一篇

猜你喜欢

热点阅读