copyWith method

CockpitScreenshotRequest copyWith({
  1. CockpitScreenshotReason? reason,
  2. String? name,
  3. bool? includeSnapshot,
  4. bool? attachToStep,
  5. CockpitSnapshotOptions? snapshotOptions,
  6. Object? profile = _unsetField,
  7. Object? allowFallback = _unsetField,
  8. Object? cropLocator = _unsetField,
})

Returns a copy of this CockpitScreenshotRequest with supplied fields replaced.

Implementation

CockpitScreenshotRequest copyWith({
  CockpitScreenshotReason? reason,
  String? name,
  bool? includeSnapshot,
  bool? attachToStep,
  CockpitSnapshotOptions? snapshotOptions,
  Object? profile = _unsetField,
  Object? allowFallback = _unsetField,
  Object? cropLocator = _unsetField,
}) {
  return CockpitScreenshotRequest(
    reason: reason ?? this.reason,
    name: name ?? this.name,
    includeSnapshot: includeSnapshot ?? this.includeSnapshot,
    attachToStep: attachToStep ?? this.attachToStep,
    snapshotOptions: snapshotOptions ?? this.snapshotOptions,
    profile: identical(profile, _unsetField)
        ? this.profile
        : profile as CockpitCaptureProfile?,
    allowFallback: identical(allowFallback, _unsetField)
        ? this.allowFallback
        : allowFallback as bool?,
    cropLocator: identical(cropLocator, _unsetField)
        ? this.cropLocator
        : cropLocator as CockpitLocator?,
  );
}