🐛 Fix windows

This commit is contained in:
2025-08-12 13:04:15 +08:00
parent 2f0cf560f8
commit 4bde708878
3 changed files with 32 additions and 5 deletions

View File

@@ -62,12 +62,14 @@ void main() async {
FirebaseMessaging.onBackgroundMessage(
_firebaseMessagingBackgroundHandler,
);
FlutterError.onError =
if (kIsWeb || !Platform.isWindows) {
FlutterError.onError =
FirebaseCrashlytics.instance.recordFlutterFatalError;
PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true;
};
PlatformDispatcher.instance.onError = (error, stack) {
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);
return true;
};
}
}
log("[SplashScreen] Firebase is ready!");

View File

@@ -313,6 +313,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.1"
console:
dependency: transitive
description:
name: console
sha256: e04e7824384c5b39389acdd6dc7d33f3efe6b232f6f16d7626f194f6a01ad69a
url: "https://pub.dev"
source: hosted
version: "4.1.0"
convert:
dependency: transitive
description:
@@ -1109,6 +1117,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.1"
get_it:
dependency: transitive
description:
name: get_it
sha256: a4292e7cf67193f8e7c1258203104eb2a51ec8b3a04baa14695f4064c144297b
url: "https://pub.dev"
source: hosted
version: "8.2.0"
glob:
dependency: transitive
description:
@@ -1581,6 +1597,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0"
msix:
dependency: "direct dev"
description:
name: msix
sha256: f88033fcb9e0dd8de5b18897cbebbd28ea30596810f4a7c86b12b0c03ace87e5
url: "https://pub.dev"
source: hosted
version: "3.16.12"
native_exif:
dependency: "direct main"
description:

View File

@@ -157,6 +157,7 @@ dev_dependencies:
riverpod_lint: ^2.6.5
drift_dev: ^2.28.0
flutter_launcher_icons: ^0.14.4
msix: ^3.16.12
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec