playSpriteAnimationOnce method
Future
playSpriteAnimationOnce(
- FutureOr<
SpriteAnimation> animation, { - Vector2? size,
- Vector2? offset,
- VoidCallback? onFinish,
- VoidCallback? onStart,
- bool loop = false,
override
Method used to play animation once time
Implementation
@override
Future playSpriteAnimationOnce(
FutureOr<SpriteAnimation> animation, {
Vector2? size,
Vector2? offset,
VoidCallback? onFinish,
VoidCallback? onStart,
bool loop = false,
}) {
return super.playSpriteAnimationOnce(
animation,
size: size,
offset: offset,
loop: loop,
onFinish: onFinish,
onStart: () {
onStart?.call();
},
);
}