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后得到的结果。
编辑:在添加安全区底部应用栏阴影后,解决了问题,但是否可能保留我之前拥有的状态栏颜色(刘海区域)?
Scaffold
包装在SafeArea
中会怎样?我猜问题出在屏幕的曲边缘上。elevation
只适用于导航栏的顶部,而不是底部。 - Mobina