命名参数' title' is -is -wewed。尝试将名称纠正到现有的名称参数的名称
return BottomNavigationBar(
type: BottomNavigationBarType.fixed,
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.home),
title: Text(
'Home',
style: TextStyle(color: Color(0xFF545454)),
),
),
BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.heart),
title: Text(
'Wish List',
style: TextStyle(color: Color(0xFF545454)),
),
),
BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.shoppingBag),
title: Text(
'Cart',
style: TextStyle(color: Color(0xFF545454)),
),
),
BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.dashcube),
title: Text(
'Dashboard',
style: TextStyle(color: Color(0xFF545454)),
),
),
],
currentIndex: _selectedIndex,
selectedItemColor: Color(0xFFAA292E),
onTap: _onItemTapped,
);
}
}
return BottomNavigationBar(
type: BottomNavigationBarType.fixed,
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(
icon: Icon(Icons.home),
title: Text(
'Home',
style: TextStyle(color: Color(0xFF545454)),
),
),
BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.heart),
title: Text(
'Wish List',
style: TextStyle(color: Color(0xFF545454)),
),
),
BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.shoppingBag),
title: Text(
'Cart',
style: TextStyle(color: Color(0xFF545454)),
),
),
BottomNavigationBarItem(
icon: Icon(FontAwesomeIcons.dashcube),
title: Text(
'Dashboard',
style: TextStyle(color: Color(0xFF545454)),
),
),
],
currentIndex: _selectedIndex,
selectedItemColor: Color(0xFFAA292E),
onTap: _onItemTapped,
);
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
bottomNavigationBariTem不再具有
标题
参数。现在应该是这样的:对于样式,您可以看到我的旧答案: https://stackoverflow.com/a/a/ 64469096/13263384
BottomNavigationBarItem doesn't have a
title
parameter anymore. It should be something like this now:For styling, you can see an old answer of mine: https://stackoverflow.com/a/64469096/13263384