errorBuilder property

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.

{@tool dartpad} The following sample uses errorBuilder to show a '😢' in place of the image that fails to load, and prints the error to the console.

** See code in examples/api/lib/widgets/image/image.error_builder.0.dart ** {@end-tool}

Implementation

final ImageErrorWidgetBuilder? errorBuilder;