image property

Image? get image

The image to display.

Implementation

ui.Image? get image => _image;
set image (Image? value)

Implementation

set image(ui.Image? value) {
  if (value == _image) {
    return;
  }
  // If we get a clone of our image, it's the same underlying native data -
  // dispose of the new clone and return early.
  if (value != null && _image != null && value.isCloneOf(_image!)) {
    value.dispose();
    return;
  }
  final bool sizeChanged = _image?.width != value?.width || _image?.height != value?.height;
  _image?.dispose();
  _image = value;
  markNeedsPaint();
  if (sizeChanged && (_width == null || _height == null)) {
    markNeedsLayout();
  }
}