简介
Flutter自定义底部导航栏。
更新内容:支持空安全 & 支持标签栏上的9个项目 & 颜色、大小、效果和字体自定义。
请查看截图
附言
请确保将您的Flutter版本升级到支持Null Safety的最新版本。
Flutter upgrade
用法
bottomNavigationBar: FancyBottomNavigation(
tabs: [
TabData(iconData: Icons.home, title: "Home", onclick: () {}),
TabData(
iconData: Icons.shopping_bag,
title: "My Cart",
onclick: () => {}),
TabData(iconData: Icons.message, title: "Message", onclick: () => {}),
TabData(
iconData: Icons.notifications, title: "Notification", onclick: () => {}),
TabData(
iconData: Icons.person,
title: "Profile",
onclick: () => {},
)
],
initialSelection: 2,
activeIconColor: Colors.white,
circleColor: Color.fromARGB(255, 245, 154, 67),
barBackgroundColor: Color.fromARGB(255, 229, 233, 234),
inactiveIconColor: Colors.grey,
key: bottomNavigationKey,
onTabChangedListener: (position) {
setState(() {
currentPage = position;
});
},
),
贡献
欢迎 Pull requests。对于重大更改,请先打开一个 issue 来讨论您想进行的更改。
请确保适当地更新测试。
我接受新的项目:[email protected]
许可证
Fancy_Botton_Navigation_Bar
在Pub dev上。
