Parcourir la source

[feat]键盘,修复键盘跳app,切换首页tab,报错

hezihao il y a 7 mois
Parent
commit
652b74f65a
2 fichiers modifiés avec 11 ajouts et 1 suppressions
  1. 3 1
      lib/module/main/main_controller.dart
  2. 8 0
      pubspec.lock

+ 3 - 1
lib/module/main/main_controller.dart

@@ -115,7 +115,9 @@ class MainController extends BaseController {
     }
 
     // 根据参数,切换Tab
-    changeIndex(tab.tabIndex);
+    WidgetsBinding.instance.addPostFrameCallback((_) {
+      changeIndex(tab.tabIndex);
+    });
   }
 }
 

+ 8 - 0
pubspec.lock

@@ -104,6 +104,14 @@ packages:
       url: "https://pub.dev"
     source: hosted
     version: "0.1.25"
+  auto_size_text:
+    dependency: "direct main"
+    description:
+      name: auto_size_text
+      sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599"
+      url: "https://pub.dev"
+    source: hosted
+    version: "3.0.0"
   boolean_selector:
     dependency: transitive
     description: