GameDecoration.withSprite constructor
GameDecoration.withSprite(})
Implementation
GameDecoration.withSprite(
FutureOr<Sprite> sprite, {
required Vector2 position,
required double height,
required double width,
}) {
_loader.add(AssetToLoad(sprite, (value) => this.sprite = value));
this.position = generateRectWithBleedingPixel(
position,
width,
height,
);
}