image property
The image to display.
Implementation
ui.Image? get image => _image;
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();
}
}