copyWith method

ScannerOptions copyWith({
  1. ScanStrategy? scanStrategy,
  2. ScanWindow? scanWindow,
  3. int? frameThrottleMs,
  4. int? targetFrameRate,
  5. bool? enableAdaptiveFrameSkipping,
  6. bool? enablePauseOnStaticFrame,
  7. Duration? duplicateTimeout,
  8. bool? enableDuplicateFilter,
  9. bool? enableIsolateProcessing,
  10. bool? enableImageEnhancement,
  11. bool? enableBlurDetection,
  12. bool? enableAutoBrightnessCheck,
  13. bool? autoTorchInLowLight,
  14. double? lowLightThreshold,
  15. bool? enableAutoZoom,
  16. bool? autoResetZoomAfterScan,
  17. double? autoZoomThreshold,
  18. bool? continuousAutofocus,
  19. bool? enableMultiCodeDetection,
  20. int? maxMultiCodeCount,
  21. bool? enableScanHistory,
  22. int? maxHistorySize,
  23. int? maxBatchCount,
  24. double? minConfidence,
  25. Rect? rectScanArea,
  26. List<String>? allowedFormats,
  27. bool? enableSound,
  28. bool? enableVibration,
  29. double? torchLevel,
  30. bool? isFocusLocked,
})

Implementation

ScannerOptions copyWith({
  ScanStrategy? scanStrategy,
  ScanWindow? scanWindow,
  int? frameThrottleMs,
  int? targetFrameRate,
  bool? enableAdaptiveFrameSkipping,
  bool? enablePauseOnStaticFrame,
  Duration? duplicateTimeout,
  bool? enableDuplicateFilter,
  bool? enableIsolateProcessing,
  bool? enableImageEnhancement,
  bool? enableBlurDetection,
  bool? enableAutoBrightnessCheck,
  bool? autoTorchInLowLight,
  double? lowLightThreshold,
  bool? enableAutoZoom,
  bool? autoResetZoomAfterScan,
  double? autoZoomThreshold,
  bool? continuousAutofocus,
  bool? enableMultiCodeDetection,
  int? maxMultiCodeCount,
  bool? enableScanHistory,
  int? maxHistorySize,
  int? maxBatchCount,
  double? minConfidence,
  Rect? rectScanArea,
  List<String>? allowedFormats,
  bool? enableSound,
  bool? enableVibration,
  double? torchLevel,
  bool? isFocusLocked,
}) {
  return ScannerOptions(
    scanStrategy: scanStrategy ?? this.scanStrategy,
    scanWindow: scanWindow ?? this.scanWindow,
    frameThrottleMs: frameThrottleMs ?? this.frameThrottleMs,
    targetFrameRate: targetFrameRate ?? this.targetFrameRate,
    enableAdaptiveFrameSkipping:
        enableAdaptiveFrameSkipping ?? this.enableAdaptiveFrameSkipping,
    enablePauseOnStaticFrame:
        enablePauseOnStaticFrame ?? this.enablePauseOnStaticFrame,
    duplicateTimeout: duplicateTimeout ?? this.duplicateTimeout,
    enableDuplicateFilter:
        enableDuplicateFilter ?? this.enableDuplicateFilter,
    enableIsolateProcessing:
        enableIsolateProcessing ?? this.enableIsolateProcessing,
    enableImageEnhancement:
        enableImageEnhancement ?? this.enableImageEnhancement,
    enableBlurDetection: enableBlurDetection ?? this.enableBlurDetection,
    enableAutoBrightnessCheck:
        enableAutoBrightnessCheck ?? this.enableAutoBrightnessCheck,
    autoTorchInLowLight: autoTorchInLowLight ?? this.autoTorchInLowLight,
    lowLightThreshold: lowLightThreshold ?? this.lowLightThreshold,
    enableAutoZoom: enableAutoZoom ?? this.enableAutoZoom,
    autoResetZoomAfterScan:
        autoResetZoomAfterScan ?? this.autoResetZoomAfterScan,
    autoZoomThreshold: autoZoomThreshold ?? this.autoZoomThreshold,
    continuousAutofocus: continuousAutofocus ?? this.continuousAutofocus,
    enableMultiCodeDetection:
        enableMultiCodeDetection ?? this.enableMultiCodeDetection,
    maxMultiCodeCount: maxMultiCodeCount ?? this.maxMultiCodeCount,
    enableScanHistory: enableScanHistory ?? this.enableScanHistory,
    maxHistorySize: maxHistorySize ?? this.maxHistorySize,
    maxBatchCount: maxBatchCount ?? this.maxBatchCount,
    minConfidence: minConfidence ?? this.minConfidence,
    rectScanArea: rectScanArea ?? this.rectScanArea,
    allowedFormats: allowedFormats ?? this.allowedFormats,
    enableSound: enableSound ?? this.enableSound,
    enableVibration: enableVibration ?? this.enableVibration,
    torchLevel: torchLevel ?? this.torchLevel,
    isFocusLocked: isFocusLocked ?? this.isFocusLocked,
  );
}