decodeNamedAnimation function
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);
}