AppErrorHandler class

Your App's error handler.

Constructors

AppErrorHandler({FlutterExceptionHandler? handler, ErrorWidgetBuilder? builder, ReportErrorHandler? report, bool? allowNewHandlers})
Singleton Pattern with only one instance of this Error Handler. Optionally supply the Error handler, Builder, and Report routines.
factory

Properties

flutterExceptionHandler → FlutterExceptionHandler?
Return the current 'Flutter Exception Handler.'
no setter
hashCode → int
The hash code for this object.
no setterinherited
onError → FlutterExceptionHandler?
Return either the current and previous Error Handler.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

displayError(FlutterErrorDetails details) → Widget
Display the Error details in a widget. try..catch to ensure a widget is returned.
dispose() → void
Return the original handlers.
isolateError(dynamic ex, StackTrace stack) → void
Report the error in an isolate.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reportError(dynamic ex, StackTrace stack, {String? message, String? library, InformationCollector? informationCollector}) → Future<void>
Report the error.
runZonedError(dynamic ex, StackTrace stack) → void
Report the error in a zone.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

inDebugger → bool
Determines if running in an IDE or in production.
no setter
ranApp ↔ bool
Flag indicating the App has already executed.
getter/setter pair

Static Methods

errorDisplayWidget(FlutterErrorDetails details) → Widget
This class is intentionally doing things using the low-level primitives to avoid depending on any subsystems that may have ended up in an unstable state -- after all, this class is mainly used when things have gone wrong.
set({FlutterExceptionHandler? handler, ErrorWidgetBuilder? builder, ReportErrorHandler? report}) → bool
Set a handler and the report