copyWith method
StringSchema
copyWith({
- bool? isNullable,
- bool? isOptional,
- String? description,
- List<
Constraint< ? constraints,String> > - List<
Refinement< ? refinements,String> >
override
Returns a copy of this schema with the given fields replaced.
Implementation
@override
StringSchema copyWith({
bool? isNullable,
bool? isOptional,
String? description,
List<Constraint<String>>? constraints,
List<Refinement<String>>? refinements,
}) {
return StringSchema(
isNullable: isNullable ?? this.isNullable,
isOptional: isOptional ?? this.isOptional,
description: description ?? this.description,
constraints: constraints ?? this.constraints,
refinements: refinements ?? this.refinements,
);
}