使用AnimatedBottomNavigationBar时,奇数图标配GapLocation.end触发渲染错误
我尝试通过AnimatedBottomNavigationBar包实现底部导航栏,但当设置gapLocation: GapLocation.end时出现错误。
代码实现
class _marketViewPageState extends State<marketViewPage> { @override Widget build(BuildContext context) { return Container( child: Scaffold( appBar: AppBar( title: Text(" Page "), ), floatingActionButton: FloatingActionButton( child: const Icon(Icons.add), onPressed: () {}, ), floatingActionButtonLocation: FloatingActionButtonLocation.endDocked, bottomNavigationBar: AnimatedBottomNavigationBar( activeColor: Colors.red, height: Get.height / 12, backgroundColor: Colors.blue, notchSmoothness: NotchSmoothness.defaultEdge, leftCornerRadius: 15, gapLocation: GapLocation.end, icons: [ Icons.home, Icons.add_shopping_cart_outlined, Icons.history_rounded, Icons.star, Icons.circle ], activeIndex: 1, onTap: (int) { print(int); }, //other params ), ), ); } }
界面显示异常

报错信息

内容的提问来源于stack exchange,提问作者Beytullah AY
相关产品推荐
相关产品推荐

