admin管理员组文章数量:1311736
As you can see in the picture below, I inserted a container for the advertising beneath the BottomNavigationBar which takes case of the safe area.
But now my BottomNavigationBar has extra room I want to remove.
Any idea?
The scaffold code I wrote is as follows:
@override
Widget build(BuildContext context) {
return Scaffold(
bottomNavigationBar: BottomNavigationBar(
onTap: (int index) => setState(() {
_selectedIndex = index;
}),
currentIndex: selectedIndex,
unselectedItemColor:
Theme.of(context).colorScheme.inversePrimary,
type: BottomNavigationBarType.fixed,
items: <BottomNavigationBarItem>[
// === Station radar
BottomNavigationBarItem(
icon: kDebugMode ? const RadarTab() : const Icon(Icons.radar),
label: i18n_Radar.i18n,
),
// === User's savings
BottomNavigationBarItem(
icon: const Icon(Icons.savings),
label: i18n_Savings.i18n,
),
// === Price evolution
BottomNavigationBarItem(
icon: const Icon(AppIcons.chart_line),
label: i18n_Evolution.i18n,
),
// === Your vehicle
BottomNavigationBarItem(
icon: const Icon(AppIcons.car),
label: i18n_Vehicle.i18n,
),
],
),
body: tabViews[_selectedIndex],
);
}
本文标签: flutterHow to reduce the safe area of the BottomNavigationBarStack Overflow
版权声明:本文标题:flutter - How to reduce the safe area of the BottomNavigationBar? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741837747a2400318.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论