可以使用BottomAppBar
,将Container
作为其子元素以指定应用栏的自定义height
(高度),然后它可以有一个Row
添加其它子元素。在Row
中可以有3个FlatButtons
,每个都包含一个Icon
和Text
在Column
中。在每个FlatButton
之间,可以添加Container
来添加分隔符。以下是代码片段:
bottomNavigationBar: BottomAppBar(
child: Container(
height: 60,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
FlatButton(
padding: EdgeInsets.all(10.0),
onPressed: () {},
child: Column(
children: <Widget>[
Icon(Icons.home),
Text('Home')
],
),
),
Container(color: Colors.black, width: 2,),
FlatButton(
padding: EdgeInsets.all(10.0),
onPressed: () {},
child: Column(
children: <Widget>[
Icon(Icons.business),
Text('Business')
],
),
),
Container(color: Colors.black, width: 2,),
FlatButton(
padding: EdgeInsets.all(10.0),
onPressed: () {},
child: Column(
children: <Widget>[
Icon(Icons.school),
Text('School')
],
),
)
]
),
)
),