mod: custom version 2

This commit is contained in:
guozhigq
2023-09-09 11:46:24 +08:00
parent 0e39453558
commit f42d0d01ea
7 changed files with 125 additions and 124 deletions

View File

@ -51,36 +51,36 @@ class _HomePageState extends State<HomePage>
callback: showUserBottonSheet,
),
const SizedBox(height: 8),
SizedBox(
width: double.infinity,
height: 42,
child: Align(
alignment: Alignment.center,
child: TabBar(
controller: _homeController.tabController,
tabs: [
for (var i in _homeController.tabs) Tab(text: i['label'])
],
isScrollable: true,
dividerColor: Colors.transparent,
enableFeedback: true,
splashBorderRadius: BorderRadius.circular(10),
onTap: (value) {
feedBack();
if (_homeController.initialIndex == value) {
_homeController.tabsCtrList[value]().animateToTop();
}
_homeController.initialIndex = value;
},
),
),
),
Expanded(
child: TabBarView(
controller: _homeController.tabController,
children: _homeController.tabsPageList,
),
),
// SizedBox(
// width: double.infinity,
// height: 42,
// child: Align(
// alignment: Alignment.center,
// child: TabBar(
// controller: _homeController.tabController,
// tabs: [
// for (var i in _homeController.tabs) Tab(text: i['label'])
// ],
// isScrollable: true,
// dividerColor: Colors.transparent,
// enableFeedback: true,
// splashBorderRadius: BorderRadius.circular(10),
// onTap: (value) {
// feedBack();
// if (_homeController.initialIndex == value) {
// _homeController.tabsCtrList[value]().animateToTop();
// }
// _homeController.initialIndex = value;
// },
// ),
// ),
// ),
// Expanded(
// child: TabBarView(
// controller: _homeController.tabController,
// children: _homeController.tabsPageList,
// ),
// ),
],
),
);