initMemoryDecoder function
Implementation
Future<AvifInfo> initMemoryDecoder(String key, Uint8List data) async {
  final JSObject decoded = await _initMemoryDecoder(key.toJS, data.toJS).toDart;
  return AvifInfo(
    width: (decoded.getProperty('width'.toJS) as JSNumber).toDartInt,
    height: (decoded.getProperty('height'.toJS) as JSNumber).toDartInt,
    imageCount: (decoded.getProperty('imageCount'.toJS) as JSNumber).toDartInt,
    duration: (decoded.getProperty('duration'.toJS) as JSNumber).toDartDouble,
  );
}