onError property

ImageErrorListener? onError
final

Callback for getting notified when an error occurs while loading an image.

If an error occurs during loading, onError will be called instead of onImage.

If onError is called and does not throw, then the error is considered to be handled. An error handler can explicitly rethrow the exception reported to it to safely indicate that it did not handle the exception.

If an image stream has no listeners that handled the error when the error was first encountered, then the error is reported using FlutterError.reportError, with the FlutterErrorDetails.silent flag set to true.

Implementation

final ImageErrorListener? onError;