Image constructor
Creates an Image instance.
texture
: The source Texture.sourceRect
: The rectangle defining the portion of thetexture
to use.pivotX
: The normalized horizontal pivot point (defaults to 0.5).pivotY
: The normalized vertical pivot point (defaults to 0.5).
Implementation
Image({required this.texture, required this.sourceRect, this.pivotX = 0.5, this.pivotY = 0.5}) {
texture.retain();
}