copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
LegacyTitledEnumSchema copyWith({
String? defaultValue,
String? description,
List<String>? enumValue,
List<String>? enumNames,
String? title,
}) =>
LegacyTitledEnumSchema.fromJson({
...toJson(),
if (defaultValue != null) 'default': $encode(defaultValue),
if (description != null) 'description': $encode(description),
if (enumValue != null) 'enum': $encode(enumValue),
if (enumNames != null) 'enumNames': $encode(enumNames),
if (title != null) 'title': $encode(title),
});