copyWith method
CameraValue
copyWith({
- bool? isInitialized,
- bool? isRecordingVideo,
- bool? isTakingPicture,
- bool? isStreamingImages,
- String? errorDescription,
- Size? previewSize,
- bool? isRecordingPaused,
- FlashMode? flashMode,
- ExposureMode? exposureMode,
- FocusMode? focusMode,
- bool? exposurePointSupported,
- bool? focusPointSupported,
- DeviceOrientation? deviceOrientation,
- Optional<
DeviceOrientation> ? lockedCaptureOrientation, - Optional<
DeviceOrientation> ? recordingOrientation, - bool? isPreviewPaused,
- CameraDescription? description,
- Optional<
DeviceOrientation> ? previewPauseOrientation,
Creates a modified copy of the object.
Explicitly specified fields get the specified value, all other fields get the same value of the current object.
Implementation
CameraValue copyWith({
bool? isInitialized,
bool? isRecordingVideo,
bool? isTakingPicture,
bool? isStreamingImages,
String? errorDescription,
Size? previewSize,
bool? isRecordingPaused,
FlashMode? flashMode,
ExposureMode? exposureMode,
FocusMode? focusMode,
bool? exposurePointSupported,
bool? focusPointSupported,
DeviceOrientation? deviceOrientation,
Optional<DeviceOrientation>? lockedCaptureOrientation,
Optional<DeviceOrientation>? recordingOrientation,
bool? isPreviewPaused,
CameraDescription? description,
Optional<DeviceOrientation>? previewPauseOrientation,
}) {
return CameraValue(
isInitialized: isInitialized ?? this.isInitialized,
errorDescription: errorDescription,
previewSize: previewSize ?? this.previewSize,
isRecordingVideo: isRecordingVideo ?? this.isRecordingVideo,
isTakingPicture: isTakingPicture ?? this.isTakingPicture,
isStreamingImages: isStreamingImages ?? this.isStreamingImages,
isRecordingPaused: isRecordingPaused ?? _isRecordingPaused,
flashMode: flashMode ?? this.flashMode,
exposureMode: exposureMode ?? this.exposureMode,
focusMode: focusMode ?? this.focusMode,
exposurePointSupported:
exposurePointSupported ?? this.exposurePointSupported,
focusPointSupported: focusPointSupported ?? this.focusPointSupported,
deviceOrientation: deviceOrientation ?? this.deviceOrientation,
lockedCaptureOrientation: lockedCaptureOrientation == null
? this.lockedCaptureOrientation
: lockedCaptureOrientation.orNull,
recordingOrientation: recordingOrientation == null
? this.recordingOrientation
: recordingOrientation.orNull,
isPreviewPaused: isPreviewPaused ?? this.isPreviewPaused,
description: description ?? this.description,
previewPauseOrientation: previewPauseOrientation == null
? this.previewPauseOrientation
: previewPauseOrientation.orNull,
);
}