onAsyncError method

  1. @override
bool onAsyncError(
  1. FlutterErrorDetails details
)
override

Supply an 'error handler' routine if something goes wrong in the corresponding initAsync() routine.

Implementation

@override
bool onAsyncError(FlutterErrorDetails details) {
  bool handled;
  try {
    handled = con?.onAsyncError(details) ?? false;
    if (!handled && inAsyncError != null) {
      handled = inAsyncError!(details);
    }
  } catch (ex) {
    handled = false;
  }
  return handled;
}