AppErrorHandler class Error handling

Your App's error handler.

Constructors

AppErrorHandler({FlutterExceptionHandler? handler, ErrorWidgetBuilder? screen, ReportErrorHandler? report, bool? presentError, bool? allowNewErrorHandlers, ParagraphStyle? paragraphStyle, TextStyle? textStyle, EdgeInsets? padding, double? minimumWidth, Color? backgroundColor})
Singleton Pattern with only one instance of this Error Handler. Optionally supply the Error handler, Builder, and Report routines.
factory

Properties

flutteryExceptionHandler FlutterExceptionHandler?
Return the App's Error Handler'
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activate() → void
Return the Error Handling
deactivate() → void
Restore the error routines.
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 in an isolate or in a run zone.
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

allowNewErrorHandlers bool
Allow new handlers in the future
getter/setter pair
inDebugMode bool
Determines if running in an IDE or in production.
no setter
presentError bool
Present error to user or not
getter/setter pair
ranApp bool
Flag indicating the App has already executed.
getter/setter pair

Static Methods

errorDisplayWidget(FlutterErrorDetails details, {ParagraphStyle? paragraphStyle, TextStyle? textStyle, EdgeInsets? padding, double? minimumWidth, Color? backgroundColor}) Widget
This function 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? screen, ReportErrorHandler? report, bool? allowNewErrorHandlers, bool? presentError, ParagraphStyle? paragraphStyle, TextStyle? textStyle, EdgeInsets? padding, double? minimumWidth, Color? backgroundColor}) bool
Set a handler and the report