loadSpriteAnimation method
Utility method to load and cache the image for a sprite animation based on its options.
The path is the full path of the asset, as declared in the
pubspec.yaml, for example assets/images/player.png.
Implementation
Future<SpriteAnimation> loadSpriteAnimation(
String path,
SpriteAnimationData data,
) {
return SpriteAnimation.load(
path,
data,
images: images,
);
}