SpriteButton.future constructor
SpriteButton.future({
- required Future<
Sprite> sprite, - required Future<
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.future({
required Future<Sprite> sprite,
required Future<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 = Future.wait([
sprite,
pressedSprite,
]);