onError method

void onError(
  1. FlutterErrorDetails details
)

App-level error handling.

Implementation

void onError(FlutterErrorDetails details) {
  // Call the App's 'current' error handler.
  final handler = errorHandler?.flutterExceptionHandler;
  if (handler != null) {
    handler(details);
  } else {
    // Call Flutter's default error handler.
    FlutterError.presentError(details);
  }
}