getNextFrame function

Future getNextFrame(
  1. String key
)

Implementation

Future<Frame> getNextFrame(String key) async {
  final JSObject decoded = await _getNextFrame(key.toJS).toDart;

  return Frame(
    data: (decoded.getProperty('data'.toJS) as JSUint8Array).toDart,
    duration: (decoded.getProperty('duration'.toJS) as JSNumber).toDartDouble,
    width: (decoded.getProperty('width'.toJS) as JSNumber).toDartInt,
    height: (decoded.getProperty('height'.toJS) as JSNumber).toDartInt,
  );
}