SpriteAnimation constructor

SpriteAnimation(
  1. List<SpriteAnimationFrame> frames, {
  2. bool loop = true,
})

Implementation

SpriteAnimation(this.frames, {this.loop = true})
    : assert(frames.isNotEmpty, 'There must be at least one animation frame'),
      assert(
        frames.every((frame) => frame.stepTime > 0),
        'All frames must have positive durations',
      );