errorFunction property

(void Function(Picture, Event)?) errorFunction

Gets or sets the function to call if an image set by #source fails to load. The arguments to this function are this Picture and the HTMLImageElement's "error" Event.

This is called once per Picture, for every Picture that is using the same #source that failed to load. This will never be called if the #source is never set, and is not called with Pictures that use #element instead.

The default value is null, meaning that no specific action occurs when there is an error loading an image.

Implementation

void Function(
  _i3.Picture,
  _i6.Event,
)? get errorFunction => (
      _i3.Picture p0,
      _i6.Event p1,
    ) =>
        _i4.callMethod(
          _i4.getProperty(
            this,
            'errorFunction',
          ),
          r'call',
          [
            this,
            p0,
            p1,
          ],
        );
void errorFunction=(void value(Picture, Event)?)

Implementation

set errorFunction(
    void Function(
      _i3.Picture,
      _i6.Event,
    )? value) {
  _i4.setProperty(
    this,
    'errorFunction',
    value == null ? _i5.undefined : _i4.allowInterop(value),
  );
}