decode method

Future<void> decode(
  1. Uint8List bytes,
  2. int width,
  3. int height
)

Implementation

Future<void> decode(
    Uint8List bytes,int width, int height) async {
  var result = await _api.decode(bytes, 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)));
    }
  }
}