From 6a949b5f6acf1f4ec58f6531b718f1732295b461 Mon Sep 17 00:00:00 2001 From: csf Date: Mon, 23 May 2022 16:24:56 +0800 Subject: [PATCH] fix platform --- flutter/.metadata | 30 ++++++++++++++++++++++++++++-- flutter/lib/main.dart | 14 ++++++-------- flutter/pubspec.lock | 18 +++++++++--------- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git a/flutter/.metadata b/flutter/.metadata index 107fcb7b5..8b4892cfb 100644 --- a/flutter/.metadata +++ b/flutter/.metadata @@ -1,10 +1,36 @@ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # -# This file should be version controlled and should not be manually edited. +# This file should be version controlled. version: - revision: 8874f21e79d7ec66d0457c7ab338348e31b17f1d + revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 channel: stable project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 + base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 + - platform: linux + create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 + base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 + - platform: macos + create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 + base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 + - platform: windows + create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 + base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart index 79e433d7f..63a1c405b 100644 --- a/flutter/lib/main.dart +++ b/flutter/lib/main.dart @@ -14,21 +14,19 @@ import 'pages/settings_page.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); - var a = FFI.ffiModel.init(); - var b = Firebase.initializeApp(); - await a; - await b; - refreshCurrentUser(); - if (Platform.isAndroid) { + await FFI.ffiModel.init(); + // await Firebase.initializeApp(); + if (isAndroid) { toAndroidChannelInit(); } + refreshCurrentUser(); runApp(App()); } class App extends StatelessWidget { @override Widget build(BuildContext context) { - final analytics = FirebaseAnalytics.instance; + // final analytics = FirebaseAnalytics.instance; return MultiProvider( providers: [ ChangeNotifierProvider.value(value: FFI.ffiModel), @@ -50,7 +48,7 @@ class App extends StatelessWidget { ? WebHomePage() : HomePage(), navigatorObservers: [ - FirebaseAnalyticsObserver(analytics: analytics), + // FirebaseAnalyticsObserver(analytics: analytics), FlutterSmartDialog.observer ], builder: FlutterSmartDialog.init( diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock index 27c7c2e74..0f9691f3a 100644 --- a/flutter/pubspec.lock +++ b/flutter/pubspec.lock @@ -56,7 +56,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" cross_file: dependency: transitive description: @@ -126,7 +126,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" ffi: dependency: "direct main" description: @@ -318,7 +318,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.4" matcher: dependency: transitive description: @@ -332,7 +332,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" meta: dependency: transitive description: @@ -360,7 +360,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" path_provider: dependency: "direct main" description: @@ -540,7 +540,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -575,7 +575,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" + version: "0.4.9" toggle_switch: dependency: "direct main" description: @@ -673,7 +673,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" wakelock: dependency: "direct main" description: @@ -745,5 +745,5 @@ packages: source: hosted version: "0.1.0" sdks: - dart: ">=2.16.1 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" flutter: ">=2.10.0"