firebase integration with Windows-safe guard implementations added.

flutter pub get run and packages updated accordingly.
pull/2765/head
spakkan 3 weeks ago
parent 3019eeffd4
commit 33206b94f3

@ -1,5 +1,6 @@
// File normally generated by FlutterFire CLI. This is a stand-in.
// See README.md for details.
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
class DefaultFirebaseOptions {

@ -0,0 +1,3 @@
abstract class CrashReporting {
void recordError(Object error, StackTrace stackTrace);
}

@ -0,0 +1,8 @@
import 'crash_reporting.dart';
class CrashReportingImpl implements CrashReporting {
@override
void recordError(Object error, StackTrace stackTrace) {
// no-op on Windows / macOS / Linux
}
}

@ -0,0 +1,5 @@
// lib/services/crash_reporting/crash_reporting_impl.dart
export 'crash_reporting_desktop.dart'
if (dart.library.android) 'crash_reporting_mobile.dart'
if (dart.library.ios) 'crash_reporting_mobile.dart';

@ -0,0 +1,9 @@
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'crash_reporting.dart';
class CrashReportingImpl implements CrashReporting {
@override
void recordError(Object error, StackTrace stackTrace) {
FirebaseCrashlytics.instance.recordError(error, stackTrace);
}
}
Loading…
Cancel
Save