【发布时间】:2020-09-04 04:21:13
【问题描述】:
我正在尝试在选定的 BottomNavigationBarItem 上显示一个栏,如此处所示。这正是我所需要的。
BottomNavigationBar(
type: BottomNavigationBarType.fixed,
currentIndex: currentIndex,
fixedColor: Colors.blue[800],
onTap: (value) {
},
items: [
BottomNavigationBarItem(
icon: Icon(
FontAwesomeIcons.shopify,
size: 21.0,
),
title: Text(
'Abc',
)),
BottomNavigationBarItem(
icon: Icon(
Icons.shop,
size: 21.0,
),
title: Text(
'Second Tab',
)),
),
],
),
参考图片
【问题讨论】:
-
使用默认的
BottomNavigationBar小部件您不能这样做,但您始终可以创建自己的小部件。