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.


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