From a83199a5172e4638dc5756b0cdcd6468dbf52fbd Mon Sep 17 00:00:00 2001 From: Yu Juncen Date: Sun, 6 Aug 2023 15:32:51 +0800 Subject: [PATCH] fix error on desktop --- ios/Podfile.lock | 6 ++++++ lib/main.dart | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index a51dabb..9499cf1 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -45,6 +45,8 @@ PODS: - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - Flutter (1.0.0) + - flutter_keyboard_visibility (0.0.1): + - Flutter - FMDB (2.7.5): - FMDB/standard (= 2.7.5) - FMDB/standard (2.7.5) @@ -113,6 +115,7 @@ DEPENDENCIES: - firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - Flutter (from `Flutter`) + - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - sqflite (from `.symlinks/plugins/sqflite/ios`) @@ -142,6 +145,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_core/ios" Flutter: :path: Flutter + flutter_keyboard_visibility: + :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" path_provider_foundation: @@ -165,6 +170,7 @@ SPEC CHECKSUMS: FirebaseCoreInternal: 950500ad8a08963657f6d8c67b579740c06d6aa1 FirebaseInstallations: 7b99ef103f013624444c614397038219c45f8e63 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a GoogleAppMeasurement: 2d800fab85e7848b1e66a6f8ce5bca06c5aad892 GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749 diff --git a/lib/main.dart b/lib/main.dart index c3accd0..b0619c7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -53,8 +53,8 @@ class MyApp extends StatelessWidget { Widget menu(ChatRoomType type) { return GetX(builder: (controller) { - if (type == ChatRoomType.phone && - controller.currentRoomIndex.value.value >= 0) { + if (controller.currentRoomIndex.value.value >= 0 && + type == ChatRoomType.phone) { return const SizedBox(); } return Container( @@ -97,7 +97,8 @@ class MyApp extends StatelessWidget { Get.put(PromptController()); Get.put(ChatRoomController()); Get.put(tagsRepo); - Get.put(NewsController(settingsCtl.openAiKey, settingsCtl.gptModel, !prefetched)); + Get.put(NewsController( + settingsCtl.openAiKey, settingsCtl.gptModel, !prefetched)); Get.put(TagCollector.create(repo: tagsRepo, sctl: settingsCtl)); prefetched = true; final newsWinKey = GlobalKey();