loadSpriteAnimation method

Future<SpriteAnimation> loadSpriteAnimation(
  1. String path,
  2. SpriteAnimationData data
)
inherited

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,
  );
}