SpriteButton constructor
SpriteButton({
- required Sprite sprite,
- required Sprite pressedSprite,
- required VoidCallback onPressed,
- required double width,
- required double height,
- required Widget label,
- Vector2? srcPosition,
- Vector2? srcSize,
- Vector2? pressedSrcPosition,
- Vector2? pressedSrcSize,
- WidgetBuilder? errorBuilder,
- WidgetBuilder? loadingBuilder,
- 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,
];