copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
StringSchema copyWith({
String? description,
StringSchemaFormat? format,
int? maxLength,
int? minLength,
String? title,
String? defaultValue,
}) =>
StringSchema.fromJson({
...toJson(),
if (description != null) 'description': $encode(description),
if (format != null) 'format': $encode(format),
if (maxLength != null) 'maxLength': $encode(maxLength),
if (minLength != null) 'minLength': $encode(minLength),
if (title != null) 'title': $encode(title),
if (defaultValue != null) 'default': $encode(defaultValue),
});