curved_navigation_bar
Flutter 中的动画弯曲导航栏。

添加依赖
dependencies:
curved_navigation_bar: ^0.1.2 #latest version
易于使用
Scaffold(
bottomNavigationBar: CurvedNavigationBar(
backgroundColor: Colors.blueAccent,
items: <Widget>[
Icon(Icons.add, size: 30),
Icon(Icons.list, size: 30),
Icon(Icons.compare_arrows, size: 30),
],
onTap: (index) {
//Handle button tap
},
),
body: Container(color: Colors.blueAccent),
)
属性
items: 控件列表
index: 初始索引
color: NavigationBar 的颜色,默认 Colors.white
backgroundColor: NavigationBar 的背景颜色,默认 Colors.blueAccent
onTap: 处理项目点击的函数
curve: 插值按钮变化动画的曲线,默认 Curves.easeOutCubic
duration: 按钮变化动画的持续时间,默认 Duration(milliseconds: 600)