copyWith method

  1. @override
IValidator copyWith({
  1. bool? nullable,
  2. bool? optional,
  3. IValidator? condition,
  4. IValidator? then,
  5. IValidator? otherwise,
})
override

Implementation

@override
IValidator copyWith({
  bool? nullable,
  bool? optional,
  IValidator? condition,
  IValidator? then,
  IValidator? otherwise,
}) =>
    WhenValidator(
      condition: condition ?? this.condition,
      then: then ?? this.then,
      otherwise: otherwise ?? this.otherwise,
      nullable: nullable ?? isNullable,
      optional: optional ?? isOptional,
    );