copyWith method

Cameras copyWith({
  1. String? name,
  2. String? resolution,
  3. String? videoResolution,
  4. String? orientation,
  5. String? focalLength,
  6. List<String>? focusModes,
  7. bool? videoSnapshotSupported,
  8. bool? videoStabilizationSupported,
  9. bool? zoomSupported,
  10. bool? smoothZoomSupported,
  11. bool? autoExposureLockingSupported,
  12. bool? autoWhiteBalanceLockingSupported,
  13. bool? flashSupported,
})

copyWith is the method to copy the class.

Implementation

Cameras copyWith({
  String? name,
  String? resolution,
  String? videoResolution,
  String? orientation,
  String? focalLength,
  List<String>? focusModes,
  bool? videoSnapshotSupported,
  bool? videoStabilizationSupported,
  bool? zoomSupported,
  bool? smoothZoomSupported,
  bool? autoExposureLockingSupported,
  bool? autoWhiteBalanceLockingSupported,
  bool? flashSupported,
}) {
  return Cameras(
    name: name ?? this.name,
    resolution: resolution ?? this.resolution,
    videoResolution: videoResolution ?? this.videoResolution,
    orientation: orientation ?? this.orientation,
    focalLength: focalLength ?? this.focalLength,
    focusModes: focusModes ?? this.focusModes,
    videoSnapshotSupported:
        videoSnapshotSupported ?? this.videoSnapshotSupported,
    videoStabilizationSupported:
        videoStabilizationSupported ?? this.videoStabilizationSupported,
    zoomSupported: zoomSupported ?? this.zoomSupported,
    smoothZoomSupported: smoothZoomSupported ?? this.smoothZoomSupported,
    autoExposureLockingSupported:
        autoExposureLockingSupported ?? this.autoExposureLockingSupported,
    autoWhiteBalanceLockingSupported: autoWhiteBalanceLockingSupported ??
        this.autoWhiteBalanceLockingSupported,
    flashSupported: flashSupported ?? this.flashSupported,
  );
}