SpriteButton constructor

SpriteButton({
  1. required Sprite sprite,
  2. required Sprite pressedSprite,
  3. required VoidCallback onPressed,
  4. required double width,
  5. required double height,
  6. required Widget label,
  7. Vector2? srcPosition,
  8. Vector2? srcSize,
  9. Vector2? pressedSrcPosition,
  10. Vector2? pressedSrcSize,
  11. WidgetBuilder? errorBuilder,
  12. WidgetBuilder? loadingBuilder,
  13. Key? key,
})

Implementation

SpriteButton({
  required Sprite sprite,
  required Sprite pressedSprite,
  required this.onPressed,
  required this.width,
  required this.height,
  required this.label,
  this.srcPosition,
  this.srcSize,
  this.pressedSrcPosition,
  this.pressedSrcSize,
  this.errorBuilder,
  this.loadingBuilder,
  super.key,
}) : _buttonsFuture = [
        sprite,
        pressedSprite,
      ];