decodeAnimation function Null safety

Animation? decodeAnimation(
  1. List<int> data

Decode the given image file bytes by first identifying the format of the file and using that decoder to decode the file into an Animation containing one or more Image frames.


Animation? decodeAnimation(List<int> data) {
  final decoder = findDecoderForData(data);
  if (decoder == null) {
    return null;
  return decoder.decodeAnimation(data);