stopScanning method

  1. @override
Future<void> stopScanning()
override

Stop QR scanning

Implementation

@override
Future<void> stopScanning() async {
  try {
    if (kDebugMode) {
      debugPrint('QuickQR Scanner: Stopping scanning');
    }

    await methodChannel.invokeMethod('stopScanning');

    if (kDebugMode) {
      debugPrint('QuickQR Scanner: Scanning stopped successfully');
    }
  } on PlatformException catch (e) {
    throw _handlePlatformException(e, 'stopScanning');
  } catch (e) {
    throw ScannerException(
      ScannerErrorCode.internalError,
      'Failed to stop scanning: $e',
    );
  }
}