Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
303 views
in Technique[技术] by (71.8m points)

flutter - White bottombar only on the new ios version

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.enter image description here

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(),
      ),
    ),
question from:https://stackoverflow.com/questions/65901751/white-bottombar-only-on-the-new-ios-version

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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(),
      ),
    ),

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...