picture property

PictureInfo? get picture

The information about the picture to draw.

Implementation

PictureInfo? get picture => _picture;
set picture (PictureInfo? value)

Implementation

set picture(PictureInfo? value) {
  // Don't use `==` because PictureInfo is mutable and it has values that are
  // not relevant to rendering.
  if (value != null &&
      value.picture == picture?.picture &&
      value.size == picture?.size &&
      value.viewport == picture?.viewport) {
    return;
  }
  _picture = value;
  _pictureHandle.layer = _picture?.createLayer();
  assert(() {
    if (_pictureHandle.layer != null) {
      assert(_pictureHandle.layer!.isComplexHint);
      assert(!_pictureHandle.layer!.willChangeHint);
    }
    return true;
  }());
  markNeedsPaint();
}