createAnimationWithVariableStepTimes method
Creates a SpriteAnimation from this SpriteSheet, using the sequence of sprites on a given row with different duration for each.
from
and to
can be specified to create an animation
from a subset of the columns on the row
Implementation
SpriteAnimation createAnimationWithVariableStepTimes({
required int row,
required List<double> stepTimes,
bool loop = true,
int from = 0,
int? to,
}) {
final spriteList = _generateSpriteList(
row: row,
to: to,
from: from,
);
return SpriteAnimation.variableSpriteList(
spriteList,
loop: loop,
stepTimes: stepTimes,
);
}