copyWith method

Constraints copyWith({
  1. bool? required,
  2. bool? optional,
  3. bool? computed,
  4. bool? sensitive,
  5. bool? writeOnly,
  6. bool? forceNew,
  7. List<String>? enumValues,
  8. String? regex,
  9. num? min,
  10. num? max,
  11. int? minLength,
  12. int? maxLength,
  13. String? deprecationMessage,
})

Implementation

Constraints copyWith({
  bool? required,
  bool? optional,
  bool? computed,
  bool? sensitive,
  bool? writeOnly,
  bool? forceNew,
  List<String>? enumValues,
  String? regex,
  num? min,
  num? max,
  int? minLength,
  int? maxLength,
  String? deprecationMessage,
}) => Constraints(
  required: required ?? this.required,
  optional: optional ?? this.optional,
  computed: computed ?? this.computed,
  sensitive: sensitive ?? this.sensitive,
  writeOnly: writeOnly ?? this.writeOnly,
  forceNew: forceNew ?? this.forceNew,
  enumValues: enumValues ?? this.enumValues,
  regex: regex ?? this.regex,
  min: min ?? this.min,
  max: max ?? this.max,
  minLength: minLength ?? this.minLength,
  maxLength: maxLength ?? this.maxLength,
  deprecationMessage: deprecationMessage ?? this.deprecationMessage,
);