AppErrorHandler class

Your App's error handler.

Constructors

AppErrorHandler({FlutterExceptionHandler? handler, ErrorWidgetBuilder? builder, ReportErrorHandler? report, bool allowNewHandlers = true})
factory

Properties

flutterExceptionHandler FlutterExceptionHandler?
no setter
hashCode int
The hash code for this object.
no setterinherited
onError FlutterExceptionHandler?
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
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({required FlutterExceptionHandler? handler, ErrorWidgetBuilder? builder, ReportErrorHandler? report}) bool
Set a handler and the report