errorBuilder property Null safety

ImageErrorWidgetBuilder? errorBuilder
final

A builder function that is called if an error occurs during image loading.

If this builder is not provided, any exceptions will be reported to FlutterError.onError. If it is provided, the caller should either handle the exception by providing a replacement widget, or rethrow the exception.

The following sample uses errorBuilder to show a '😢' in place of the image that fails to load, and prints the error to the console.
To create a local project with this code sample, run:
flutter create --sample=widgets.Image.errorBuilder.1 mysample

Implementation

final ImageErrorWidgetBuilder? errorBuilder;