copyWith method
CockpitScreenshotRequest
copyWith({
- CockpitScreenshotReason? reason,
- String? name,
- bool? includeSnapshot,
- bool? attachToStep,
- CockpitSnapshotOptions? snapshotOptions,
- Object? profile = _unsetField,
- Object? allowFallback = _unsetField,
- 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?,
);
}