如上图所示,iPhone 11的底部导航栏具有底部阴影,有什么方法可以去除阴影?
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: BottomAppBar(
clipBehavior: Clip.antiAliasWithSaveLayer,
shape: CircularNotchedRectangle(),
child: Theme(
data: Theme.of(buildContext)
.copyWith(canvasColor: Colors.white, primaryColor: Colors.grey),
child: BottomNavigationBar(
onTap: (index){
},
type: BottomNavigationBarType.fixed,
items: bottomNavigationBar.map((element) {
return BottomNavigationBarItem(
icon: Icon(element["icon"]), title: Text(element["title"]));
}).toList(),
),
),
));
编辑:这是设置高程:0后得到的结果
编辑:添加了safearea bottomAppBar阴影问题后,但是可以保留以前使用过的statusBarColor(陷波区域)吗?
答案 0 :(得分:1)
在您的BottomNavigationBar 内放置elevation: 0.0
示例:
child: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
backgroundColor: Theme.of(context).primaryColor,
elevation: 0.0,