mirror of https://github.com/flutter/samples.git
flutter pub get run and packages updated accordingly.pull/2765/head
parent
3019eeffd4
commit
33206b94f3
@ -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…
Reference in new issue