Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 移除底部导航栏颤振中的底部阴影效果_Flutter_Dart - Fatal编程技术网

Flutter 移除底部导航栏颤振中的底部阴影效果

Flutter 移除底部导航栏颤振中的底部阴影效果,flutter,dart,Flutter,Dart,如上图所示,iPhone11的底部导航栏有底部阴影,有没有办法去除阴影 floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, bottomNavigationBar: BottomAppBar( clipBehavior: Clip.antiAliasWithSaveLayer, shape: CircularNotchedRectangle(), child:

如上图所示,iPhone11的底部导航栏有底部阴影,有没有办法去除阴影

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.0
例如:


请尝试BottomAppBarelevation:0的高程:0,删除底部导航栏顶部的阴影。底部阴影保持不变:(我已经阅读了上面的代码,高程=0完全符合您的要求。如果可能,您可以分享添加高程=0后如何获得bottomAppBar的图像吗?我已经在bottomAppBar中设置高程:0后添加了结果图像。如果您使用
安全区域
包装整个
脚手架
,我想问题是em带有屏幕的弯曲边缘。
高程
仅用于导航栏的顶部,而不是底部。
child: BottomNavigationBar(
        type: BottomNavigationBarType.fixed,
        backgroundColor: Theme.of(context).primaryColor,
        elevation: 0.0,