Browse Source

防止在当前页面重复跳转

weicu
lxm 2 years ago
parent
commit
048703440f
  1. 1
      lib/core/widgets/common_bottom_nav.dart

1
lib/core/widgets/common_bottom_nav.dart

@ -18,6 +18,7 @@ class CommonBottomNav extends StatelessWidget {
currentIndex: currentIndex,
onTap: (index) {
// Navigate to the appropriate page based on index
if(index ==currentIndex) return;//如果是当前页面,不跳转
switch (index) {
case 0:
Get.offAllNamed(Routes.home);

Loading…
Cancel
Save