|
|
5 年之前 | |
|---|---|---|
| android | 5 年之前 | |
| ios | 5 年之前 | |
| lib | 5 年之前 | |
| test | 5 年之前 | |
| .metadata | 5 年之前 | |
| .packages | 5 年之前 | |
| CHANGELOG.md | 5 年之前 | |
| LICENSE | 5 年之前 | |
| README.md | 5 年之前 | |
| flutter_pager_list.iml | 5 年之前 | |
| local.properties | 5 年之前 | |
| pubspec.lock | 5 年之前 | |
| pubspec.yaml | 5 年之前 |
# flutter_simple_tabbar
simple tabbar without TabController, just one widget
json转对象文档:https://www.jianshu.com/p/da99262b17df
支持监听页面切换,支持切换tab位置
使用方法:
ValueNotifier changeIndex = new ValueNotifier(2);
this.changeIndex.value = 0; //切换tab,直接设置ValueNotifier的值
SimpleTabBar(
tabs: tabs,
changeIndex:changeIndex, //如果需要代码切换tab,可以使用这个属性
onTabChange:(index) {
print('onTabChange');
print(index);
},
tabContents: tabs
.map((Tab tab) =>
Container(child: Center(child: Text(tab.text),),))
.toList(),
),
);