Skip to content

Commit

Permalink
fix: search init index
Browse files Browse the repository at this point in the history
Signed-off-by: bggRGjQaUbCoE <[email protected]>
  • Loading branch information
bggRGjQaUbCoE committed Nov 27, 2024
1 parent e405395 commit 6684eef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/pages/search_result/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
}

Expand Down

0 comments on commit 6684eef

Please sign in to comment.