processBytes method

Future<ScanResult> processBytes(
  1. Uint8List bytes, {
  2. ScanMode? mode,
  3. int width = 640,
  4. int height = 480,
})

Processes raw byte buffer directly from memory.

Implementation

Future<ScanResult> processBytes(
  Uint8List bytes, {
  ScanMode? mode,
  int width = 640,
  int height = 480,
}) async {
  final targetMode = mode ?? _selectedMode;
  final result = await _scanEngine.processBytes(
    bytes,
    targetMode,
    width: width,
    height: height,
  );
  _emitScanDataEvent(result);
  return result;
}