mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: search init index
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -29,10 +29,12 @@ class _SearchResultPageState extends State<SearchResultPage>
|
||||
|
||||
_tabController = TabController(
|
||||
vsync: this,
|
||||
initialIndex: Get.arguments,
|
||||
initialIndex: Get.arguments is int ? Get.arguments : 0,
|
||||
length: SearchType.values.length,
|
||||
)..addListener(() {
|
||||
Get.find<SSearchController>().initIndex = _tabController.index;
|
||||
if (Get.isRegistered<SSearchController>()) {
|
||||
Get.find<SSearchController>().initIndex = _tabController.index;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user