如何在flutter中圆化BottomAppBar我想像这样圆化左上角和右上角
bottomNavigationBar: BottomAppBar(
color: Colors.green[200]?.withOpacity(0.8),
child: Container(
height: MediaQuery.of(context).size.height/9,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.white),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50))),
),
onPressed: () {},
child: Icon(
Icons.store,
color: Colors.black87,
size: 50,
),
),
ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.white),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50))),
),
onPressed: () {},
child: Icon(
Icons.home,
color: Colors.black87,
size: 50,
),
),
ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.white),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(50))),
),
onPressed: () {},
child: Icon(
Icons.settings,
color: Colors.black87,
size: 50,
),
)
],
)
),
)
3条答案
按热度按时间pcww981p1#
您可以使用浮动操作按钮作为底栏
vqlkdk9b2#
您可以像这样使用ClipRRect:
nwsw7zdq3#
使用
ClipRRect
折绕并指定每个角的半径值: