transform property Null safety

RSTransform transform

Implementation

RSTransform get transform {
  if (_dirty) {
    _transform = RSTransform.fromComponents(
      rotation: _rotation,
      scale: texture.computeRenderScale(_scalingMode, _size) * _scale,
      anchorX: -texture.trimOffset.x + texture.size.x / 2.0,
      anchorY: -texture.trimOffset.y + texture.size.y / 2.0,
      translateX: _position.x,
      translateY: _position.y,
    );

    _dirty = false;
  }

  return _transform!;
}