addAnimation method

TrackEntry addAnimation(
  1. int trackIndex,
  2. String animationName,
  3. bool loop,
  4. double delay,
)

Implementation

TrackEntry addAnimation(
    int trackIndex, String animationName, bool loop, double delay) {
  final Animation? animation = data.skeletonData.findAnimation(animationName);
  if (animation == null) {
    throw ArgumentError('Animation not found: $animationName');
  }
  return addAnimationWith(trackIndex, animation, loop, delay);
}