copyWith method

UCameraValue copyWith({
  1. UCameraState? state,
  2. UCameraDevice? device,
  3. UCameraCapabilities? capabilities,
  4. UCameraSize? previewSize,
  5. int? textureId,
  6. String? viewType,
  7. int? sensorOrientation,
  8. int? displayRotation,
  9. UCameraOrientation? deviceOrientation,
  10. UCameraOrientation? lockedOrientation,
  11. UFlashMode? flash,
  12. bool? torchOn,
  13. double? zoom,
  14. double? exposureOffset,
  15. UExposureMode? exposureMode,
  16. UFocusMode? focusMode,
  17. UWhiteBalanceMode? whiteBalance,
  18. double? iso,
  19. Duration? exposureDuration,
  20. UStabilizationMode? stabilization,
  21. UHdrMode? hdr,
  22. UNightMode? nightMode,
  23. Duration? recordingDuration,
  24. int? recordingBytes,
  25. bool? isStreamingFrames,
  26. bool? isScanning,
  27. bool? mirrored,
  28. Offset? focusPoint,
  29. UCameraException? error,
  30. bool clearError = false,
  31. bool clearFocusPoint = false,
  32. 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),
);