SpriteAnimation.spriteList constructor

SpriteAnimation.spriteList(
  1. List<Sprite> sprites, {
  2. required double stepTime,
  3. bool loop = true,
})

Create animation from a list of sprites all having the same transition time stepTime.

Implementation

factory SpriteAnimation.spriteList(
  List<Sprite> sprites, {
  required double stepTime,
  bool loop = true,
}) {
  return SpriteAnimation(
    sprites.map((sprite) => SpriteAnimationFrame(sprite, stepTime)).toList(),
    loop: loop,
  );
}