decodeYUV method

Future<void> decodeYUV(
  1. Uint8List yuv,
  2. int width,
  3. int height
)

Implementation

Future<void> decodeYUV(
    Uint8List yuv, int width, int height) async {
  var result = await _api.decodeYUV(yuv,width, height,options);
  if (result.isEmpty) {
    _resultSc.add(ResultEvent(ScanResult.empty()));
  } else {
    if (result.containsKey('zoomValue')) {
      _resultSc.add(ZoomEvent(result['zoomValue']));
    } else {
      _resultSc.add(ResultEvent(ScanResult.from(result)));
    }
  }
}