onError method

FutureOr<void> onError(
  1. Object error,
  2. StackTrace stackTrace
)
inherited

Called when an error occurs during lifecycle transitions.

Override this method to implement custom error handling strategies.

Parameters:

  • error - The error that occurred
  • stackTrace - Stack trace of the error

Implementation

FutureOr<void> onError(Object error, StackTrace stackTrace) async {
  this.error('Module error: $error');
}