decodeNamedAnimation function

Animation? decodeNamedAnimation(
  1. List<int> bytes,
  2. String name
)

Identify the format of the image using the file extension of the given name, and decode the given file bytes to an Animation with one or more Image frames. See also decodeAnimation.

Implementation

Animation? decodeNamedAnimation(List<int> bytes, String name) {
  final decoder = getDecoderForNamedImage(name);
  if (decoder == null) {
    return null;
  }
  return decoder.decodeAnimation(bytes);
}