AppErrorHandler class Error handling
Your App's error handler.
- Mixed-in types
-
- HandleError
- StateXonErrorMixin
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
- errorHandler → FlutterExceptionHandler?
-
The current Error Handler. Used in app_state.dart
no setter
- errorMsg → String
-
Simply display the error.
no setterinherited
- flutteryExceptionHandler → FlutterExceptionHandler?
-
Return the App's Error Handler'
no setter
- hasError → bool
-
Indicate if the app is 'in error.'
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- inError → bool
-
Indicate if app is 'in error.'
no setterinherited
- oldBuilder → ErrorWidgetBuilder?
-
The original Displayed Error Widget at start up.
no setter
- oldOnError → FlutterExceptionHandler?
-
The original Error Handler at start up.
no setter
- 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.
-
getError(
[dynamic error]) → Exception? -
Return the 'last' error if any.
inherited
-
isolateError(
dynamic ex, StackTrace stack) → void - Report the error in an isolate.
-
logErrorDetails(
FlutterErrorDetails details) → void -
Logs 'every' error as the error count is reset.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
FlutterErrorDetails details) → void -
Offer an error handler
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.
-
reset(
) → bool - Reset the Error Handler and such.
-
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