我在 iPhone 上的 Flutter 中遇到了這個 bottomAppBar 問題。我不知道為什么,但是底部有這個白色區域,當我更改應用程式的主題時,它并沒有隨之改變(僅當我放了這個 bottomAppBar 時)有人知道如何解決這個問題嗎?謝謝

bottomNavigationBar: BottomAppBar(
child:
Container(
color: Color.fromRGBO(10, 10, 10, 1),
height: 60,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(
onPressed: () {
setState(() {
currentScreen = Fy();
currentTab = 0;
});
},
iconSize: 40,
icon: const Icon(Icons.home),
color: currentTab == 0 ? Colors.blue : Colors.grey,
),
MaterialButton(
onPressed: () {
setState(() {
currentScreen = const Search();
currentTab = 1;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.search,
size: 40,
color: currentTab == 1 ? Colors.blue : Colors.grey,
),
],
),
),
]
),
],
),
)
));
}
}
uj5u.com熱心網友回復:
你SafeArea在底部導航欄的樹上的某個地方有一個小部件嗎?如果是這樣,請將其bottom屬性設定為false. 這將使您的 UI 構建到螢屏底部。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/524563.html
標籤:扑镖
