问题
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