initMemoryDecoder function

Future<AvifInfo> initMemoryDecoder(
  1. String key,
  2. Uint8List data
)

Implementation

Future<AvifInfo> initMemoryDecoder(String key, Uint8List data) async {
  final JSObject decoded = await promiseToFuture(_initMemoryDecoder(key, data));

  return AvifInfo(
    width: decoded.getProperty('width'.toJS) as int,
    height: decoded.getProperty('height'.toJS) as int,
    imageCount: decoded.getProperty('imageCount'.toJS) as int,
    duration: decoded.getProperty('duration'.toJS) as double,
  );
}