encodeAnimation method Null safety

  1. @override
List<int>? encodeAnimation(
  1. Animation anim
)
override

Encode an animation.

Implementation

@override
List<int>? encodeAnimation(Animation anim) {
  isAnimated = true;
  _frames = anim.frames.length;
  repeat = anim.loopCount;

  for (var f in anim) {
    addFrame(f);
  }
  return finish();
}