decodeSingleFrameImage function
Implementation
Future<Frame> decodeSingleFrameImage(Uint8List data) async {
final JSObject decoded = await promiseToFuture(_decodeSingleFrameImage(data));
return Frame(
data: decoded.getProperty('data'.toJS) as Uint8List,
duration: decoded.getProperty('duration'.toJS) as double,
width: decoded.getProperty('width'.toJS) as int,
height: decoded.getProperty('height'.toJS) as int,
);
}