FlutterErrorHandler class

A centralized coordinator for intercepting, logging, and reporting application errors.

It captures both Flutter-specific UI/framework errors and asynchronous root-level platform errors, ensuring they are consistently logged or sent to remote monitoring services.

Constructors

FlutterErrorHandler({required AppLogger logger, bool reportErrors = true})
Creates a FlutterErrorHandler instance.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

logError(String message, Object? error, StackTrace? stackTrace) → void
Routes the captured error and stackTrace to the appropriate logging level.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerFlutterErrorHandler() → void
Binds the custom error tracking pipelines to global Flutter frameworks hooks.
reportErrorToService(Object error, StackTrace stackTrace, String? context) → void
Sends the captured exception to an external crash tracking service.
toString() String
A string representation of this object.
inherited

Operators

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