copyWith method
DatumConflictResolution<T>
copyWith({
- DatumResolutionStrategy? strategy,
- T? resolvedData,
- bool? requiresUserInput,
- String? message,
- bool setResolvedDataToNull = false,
Creates a copy of this resolution with updated fields.
Implementation
DatumConflictResolution<T> copyWith({
DatumResolutionStrategy? strategy,
T? resolvedData,
bool? requiresUserInput,
String? message,
bool setResolvedDataToNull = false,
}) {
return DatumConflictResolution<T>._(
strategy: strategy ?? this.strategy,
// If setResolvedDataToNull is true, set it to null, otherwise use the
// provided value or the existing one.
resolvedData: setResolvedDataToNull ? null : (resolvedData ?? this.resolvedData),
requiresUserInput: requiresUserInput ?? this.requiresUserInput,
message: message ?? this.message,
);
}