Skip to content

Commit

Permalink
fix: tabbar指示器抖动
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Mar 25, 2024
1 parent 1953653 commit d6fd299
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/pages/rank/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,5 @@ class RankController extends GetxController with GetTickerProviderStateMixin {
length: tabs.length,
vsync: this,
);
// 监听 tabController 切换
if (enableGradientBg) {
tabController.animation!.addListener(() {
if (tabController.indexIsChanging) {
if (initialIndex.value != tabController.index) {
initialIndex.value = tabController.index;
}
} else {
final int temp = tabController.animation!.value.round();
if (initialIndex.value != temp) {
initialIndex.value = temp;
tabController.index = initialIndex.value;
}
}
});
}
}
}

0 comments on commit d6fd299

Please sign in to comment.