copyWith method

PasswordValidationConfig copyWith({
  1. int? minLength,
  2. int? maxLength,
  3. int? minComplexityScore,
  4. int? minAsciiCode,
  5. int? maxAsciiCode,
  6. double? sequentialRunFactor,
  7. Set<String>? commonPasswords,
  8. List<String>? commonPrefixes,
})

Returns a copy of this config with the given fields replaced.

Implementation

PasswordValidationConfig copyWith({
  int? minLength,
  int? maxLength,
  int? minComplexityScore,
  int? minAsciiCode,
  int? maxAsciiCode,
  double? sequentialRunFactor,
  Set<String>? commonPasswords,
  List<String>? commonPrefixes,
}) {
  return PasswordValidationConfig(
    minLength: minLength ?? this.minLength,
    maxLength: maxLength ?? this.maxLength,
    minComplexityScore: minComplexityScore ?? this.minComplexityScore,
    minAsciiCode: minAsciiCode ?? this.minAsciiCode,
    maxAsciiCode: maxAsciiCode ?? this.maxAsciiCode,
    sequentialRunFactor: sequentialRunFactor ?? this.sequentialRunFactor,
    commonPasswords: commonPasswords ?? this.commonPasswords,
    commonPrefixes: commonPrefixes ?? this.commonPrefixes,
  );
}