copyWith method

ValidationFailure2 copyWith({
  1. String? propertyName,
  2. String? errorMessage,
  3. dynamic attemptedValue,
  4. dynamic customState,
  5. Severity? severity,
  6. String? errorCode,
  7. Map<String, dynamic>? formattedMessagePlaceholderValues,
})

Implementation

ValidationFailure2 copyWith(
    {String? propertyName,
    String? errorMessage,
    dynamic? attemptedValue,
    dynamic? customState,
    enums.Severity? severity,
    String? errorCode,
    Map<String, dynamic>? formattedMessagePlaceholderValues}) {
  return ValidationFailure2(
      propertyName: propertyName ?? this.propertyName,
      errorMessage: errorMessage ?? this.errorMessage,
      attemptedValue: attemptedValue ?? this.attemptedValue,
      customState: customState ?? this.customState,
      severity: severity ?? this.severity,
      errorCode: errorCode ?? this.errorCode,
      formattedMessagePlaceholderValues: formattedMessagePlaceholderValues ??
          this.formattedMessagePlaceholderValues);
}