encodeAnimation method Null safety

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

Encode an animation.

Implementation

@override
List<int>? encodeAnimation(Animation anim) {
  repeat = anim.loopCount;
  for (var f in anim) {
    addFrame(
      f,
      duration: f.duration ~/ 10, // Convert ms to 1/100 sec.
    );
  }
  return finish();
}