load static method
Takes a path of an image, a SpriteAnimationData and loads the sprite
animation.
When the images
is omitted, the global Flame.images is used.
Implementation
static Future<SpriteAnimation> load(
String src,
SpriteAnimationData data, {
Images? images,
}) async {
final imagesCache = images ?? Flame.images;
final image = await imagesCache.load(src);
return SpriteAnimation.fromFrameData(image, data);
}