SpriteAnimation constructor
SpriteAnimation(
- List<
SpriteAnimationFrame> frames, { - 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',
);