stopScanning method

Future<void> stopScanning()

Halts the barcode scanning process, stopping the camera from capturing and processing barcode information.

Example usage:

await _barkoder.stopScanning();
print('Scanning stopped');

Implementation

Future<void> stopScanning() {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  _clearScanningResultsStreamSubscription();
  return _methodChannel.invokeMethod('stopScanning');
}