White bottombar only on the new ios version

旧城冷巷雨未停 提交于 2021-02-11 12:32:17

问题


Does anyone know how to get rid of the white bottom bar(aka home indicator) (see picture). It appears only on IOS 14 devices and more specific on devices without a homebutton. Thanks.

Edited: It appears only when a bottombar is implemented.

        bottomNavigationBar: BottomAppBar(
      child: Container(
        decoration: BoxDecoration(
          gradient: LinearGradient(
              begin: Alignment.centerLeft,
              end: Alignment.centerRight,
              colors: [Colors.deepPurple[400], Colors.deepPurple[700]]),
        ),
        height: getBottomBarSize(),
        child: getText(),
      ),
    ),

回答1:


I got a solution, somehow the BottomAppBar is the problem, following snippet works for me.(Changing BottomAppBar to SafeArea and set bootom:false)

    bottomNavigationBar: SafeArea(
      bottom: false,
      child: Container(
        decoration: BoxDecoration(
          gradient: LinearGradient(
              begin: Alignment.centerLeft,
              end: Alignment.centerRight,
              colors: [Colors.deepPurple[400], Colors.deepPurple[700]]),
        ),
        height: getBottomBarSize(),
        child: getText(),
      ),
    ),


来源:https://stackoverflow.com/questions/65901751/white-bottombar-only-on-the-new-ios-version

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!