Icon(
data.icon,
color: Colors.grey,
),
/// 选中状态下的图标...私有变量 , 即可控制 BottomNavigationBar 的选中状态 ;
BottomNavigationBar 主动设置选中状态 : 在 BottomNavigationBar 的 onTap..., 切换页面 , 使用 PageView 的 PageController 的 jumpToPage 方法进行页面跳转 ;
PageView 主动设置选中状态 : 滑动 PageView 界面 , 会回调...Icon(
data.icon,
color: Colors.grey,
),
/// 选中状态下的图标...导航数据构造函数
const TabData({this.index, this.title, this.icon});
/// 导航标题
final String title;
/// 导航图标