copyWith method
UCameraValue
copyWith({
- UCameraState? state,
- UCameraDevice? device,
- UCameraCapabilities? capabilities,
- UCameraSize? previewSize,
- int? textureId,
- String? viewType,
- int? sensorOrientation,
- int? displayRotation,
- UCameraOrientation? deviceOrientation,
- UCameraOrientation? lockedOrientation,
- UFlashMode? flash,
- bool? torchOn,
- double? zoom,
- double? exposureOffset,
- UExposureMode? exposureMode,
- UFocusMode? focusMode,
- UWhiteBalanceMode? whiteBalance,
- double? iso,
- Duration? exposureDuration,
- UStabilizationMode? stabilization,
- UHdrMode? hdr,
- UNightMode? nightMode,
- Duration? recordingDuration,
- int? recordingBytes,
- bool? isStreamingFrames,
- bool? isScanning,
- bool? mirrored,
- Offset? focusPoint,
- UCameraException? error,
- bool clearError = false,
- bool clearFocusPoint = false,
- bool clearTexture = false,
Implementation
UCameraValue copyWith({
UCameraState? state,
UCameraDevice? device,
UCameraCapabilities? capabilities,
UCameraSize? previewSize,
int? textureId,
String? viewType,
int? sensorOrientation,
int? displayRotation,
UCameraOrientation? deviceOrientation,
UCameraOrientation? lockedOrientation,
UFlashMode? flash,
bool? torchOn,
double? zoom,
double? exposureOffset,
UExposureMode? exposureMode,
UFocusMode? focusMode,
UWhiteBalanceMode? whiteBalance,
double? iso,
Duration? exposureDuration,
UStabilizationMode? stabilization,
UHdrMode? hdr,
UNightMode? nightMode,
Duration? recordingDuration,
int? recordingBytes,
bool? isStreamingFrames,
bool? isScanning,
bool? mirrored,
Offset? focusPoint,
UCameraException? error,
bool clearError = false,
bool clearFocusPoint = false,
bool clearTexture = false,
}) => UCameraValue(
state: state ?? this.state,
device: device ?? this.device,
capabilities: capabilities ?? this.capabilities,
previewSize: previewSize ?? this.previewSize,
textureId: clearTexture ? null : (textureId ?? this.textureId),
viewType: clearTexture ? null : (viewType ?? this.viewType),
sensorOrientation: sensorOrientation ?? this.sensorOrientation,
displayRotation: displayRotation ?? this.displayRotation,
deviceOrientation: deviceOrientation ?? this.deviceOrientation,
lockedOrientation: lockedOrientation ?? this.lockedOrientation,
flash: flash ?? this.flash,
torchOn: torchOn ?? this.torchOn,
zoom: zoom ?? this.zoom,
exposureOffset: exposureOffset ?? this.exposureOffset,
exposureMode: exposureMode ?? this.exposureMode,
focusMode: focusMode ?? this.focusMode,
whiteBalance: whiteBalance ?? this.whiteBalance,
iso: iso ?? this.iso,
exposureDuration: exposureDuration ?? this.exposureDuration,
stabilization: stabilization ?? this.stabilization,
hdr: hdr ?? this.hdr,
nightMode: nightMode ?? this.nightMode,
recordingDuration: recordingDuration ?? this.recordingDuration,
recordingBytes: recordingBytes ?? this.recordingBytes,
isStreamingFrames: isStreamingFrames ?? this.isStreamingFrames,
isScanning: isScanning ?? this.isScanning,
mirrored: mirrored ?? this.mirrored,
focusPoint: clearFocusPoint ? null : (focusPoint ?? this.focusPoint),
error: clearError ? null : (error ?? this.error),
);