FirebaseCrashReporter class
Firebase Crashlytics-backed CrashReporter.
final reporter = FirebaseCrashReporter();
await reporter.initialize();
FlutterError.onError = (details) async {
await reporter.recordError(
details.exception,
details.stack,
fatal: true,
);
};
- Implemented types
Constructors
- FirebaseCrashReporter({FirebaseCrashlytics? crashlytics})
- Creates a FirebaseCrashReporter.
Properties
Methods
-
addBreadcrumb(
Breadcrumb breadcrumb) → void -
Appends
breadcrumbto the trail of events leading up to a crash.override -
clearUser(
) → void -
Removes the current user association.
override
-
flush(
) → Future< void> -
Flushes any pending crash reports to the backend.
override
-
initialize(
) → Future< void> -
Performs one-time initialisation of the underlying SDK.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordError(
Object error, StackTrace? stackTrace, {String? reason, Map< String, dynamic> ? context, bool fatal = false}) → Future<void> -
Records
errorwith optionalstackTraceand contextualreason.override -
setCustomKey(
String key, Object value) → void -
Attaches a persistent key-value pair to every report.
override
-
setEnabled(
{required bool enabled}) → void -
Enables or disables crash reporting at runtime.
override
-
setUser(
{required String id, String? email, String? name}) → void -
Associates subsequent reports with the given user
id.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited