copyWith method
ScanOptions
copyWith({
- List<
BarcodeFormat> ? formats, - bool? enableFlash,
- bool? autoFocus,
- bool? multiScan,
- int? maxScans,
- bool? beepOnScan,
- bool? vibrateOnScan,
- bool? showOverlay,
- int? overlayColor,
- bool? restrictScanArea,
- double? scanAreaRatio,
- int? timeoutSeconds,
- bool? returnImage,
- double? imageQuality,
- bool? detectInverted,
- CameraResolution? cameraResolution,
- CameraFacing? cameraFacing,
Creates a copy of this options with the given fields replaced
Implementation
ScanOptions copyWith({
List<BarcodeFormat>? formats,
bool? enableFlash,
bool? autoFocus,
bool? multiScan,
int? maxScans,
bool? beepOnScan,
bool? vibrateOnScan,
bool? showOverlay,
int? overlayColor,
bool? restrictScanArea,
double? scanAreaRatio,
int? timeoutSeconds,
bool? returnImage,
double? imageQuality,
bool? detectInverted,
CameraResolution? cameraResolution,
CameraFacing? cameraFacing,
}) {
return ScanOptions(
formats: formats ?? this.formats,
enableFlash: enableFlash ?? this.enableFlash,
autoFocus: autoFocus ?? this.autoFocus,
multiScan: multiScan ?? this.multiScan,
maxScans: maxScans ?? this.maxScans,
beepOnScan: beepOnScan ?? this.beepOnScan,
vibrateOnScan: vibrateOnScan ?? this.vibrateOnScan,
showOverlay: showOverlay ?? this.showOverlay,
overlayColor: overlayColor ?? this.overlayColor,
restrictScanArea: restrictScanArea ?? this.restrictScanArea,
scanAreaRatio: scanAreaRatio ?? this.scanAreaRatio,
timeoutSeconds: timeoutSeconds ?? this.timeoutSeconds,
returnImage: returnImage ?? this.returnImage,
imageQuality: imageQuality ?? this.imageQuality,
detectInverted: detectInverted ?? this.detectInverted,
cameraResolution: cameraResolution ?? this.cameraResolution,
cameraFacing: cameraFacing ?? this.cameraFacing,
);
}