copyWith method
CockpitRecordingResult
copyWith({
- CockpitRecordingState? state,
- CockpitRecordingPurpose? purpose,
- CockpitRecordingKind? recordingKind,
- Object? requestedMode = _unsetField,
- Object? requestedLayer = _unsetField,
- Object? effectiveLayer = _unsetField,
- bool? fallbackUsed,
- Object? fallbackReason = _unsetField,
- Object? artifact = _unsetField,
- Object? durationMs = _unsetField,
- Object? bytes = _unsetField,
- Object? sourceFilePath = _unsetField,
- Object? failureReason = _unsetField,
Returns a copy of this CockpitRecordingResult with supplied fields replaced.
Implementation
CockpitRecordingResult copyWith({
CockpitRecordingState? state,
CockpitRecordingPurpose? purpose,
CockpitRecordingKind? recordingKind,
Object? requestedMode = _unsetField,
Object? requestedLayer = _unsetField,
Object? effectiveLayer = _unsetField,
bool? fallbackUsed,
Object? fallbackReason = _unsetField,
Object? artifact = _unsetField,
Object? durationMs = _unsetField,
Object? bytes = _unsetField,
Object? sourceFilePath = _unsetField,
Object? failureReason = _unsetField,
}) {
return CockpitRecordingResult(
state: state ?? this.state,
purpose: purpose ?? this.purpose,
recordingKind: recordingKind ?? this.recordingKind,
requestedMode: identical(requestedMode, _unsetField)
? this.requestedMode
: requestedMode as CockpitRecordingMode?,
requestedLayer: identical(requestedLayer, _unsetField)
? this.requestedLayer
: requestedLayer as CockpitRecordingLayer?,
effectiveLayer: identical(effectiveLayer, _unsetField)
? this.effectiveLayer
: effectiveLayer as CockpitRecordingLayer?,
fallbackUsed: fallbackUsed ?? this.fallbackUsed,
fallbackReason: identical(fallbackReason, _unsetField)
? this.fallbackReason
: fallbackReason as String?,
artifact: identical(artifact, _unsetField)
? this.artifact
: artifact as CockpitArtifactRef?,
durationMs: identical(durationMs, _unsetField)
? this.durationMs
: durationMs as int?,
bytes: identical(bytes, _unsetField) ? this.bytes : bytes as List<int>?,
sourceFilePath: identical(sourceFilePath, _unsetField)
? this.sourceFilePath
: sourceFilePath as String?,
failureReason: identical(failureReason, _unsetField)
? this.failureReason
: failureReason as String?,
);
}