getNextFrame function
Implementation
Future<Frame> getNextFrame(String key) async {
final JSObject decoded = await promiseToFuture(_getNextFrame(key));
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,
);
}