SpriteWidget constructor

const SpriteWidget({
  1. required Sprite sprite,
  2. Anchor anchor = Anchor.topLeft,
  3. double angle = 0,
  4. WidgetBuilder? errorBuilder,
  5. WidgetBuilder? loadingBuilder,
  6. Paint? paint,
  7. Key? key,
})

renders the sprite as a Widget.

To change the source size and position, see Sprite.new

Implementation

const SpriteWidget({
  required Sprite sprite,
  this.anchor = Anchor.topLeft,
  this.angle = 0,
  this.errorBuilder,
  this.loadingBuilder,
  this.paint,
  super.key,
}) : _spriteFuture = sprite;