StringSchema constructor
StringSchema({
- String? title,
- String? description,
- int? minLength,
- int? maxLength,
- String? pattern,
- String? defaultValue,
- StringFormat? format,
- @Deprecated('Use UntitledSingleSelectEnumSchema instead.') Iterable<
String> ? enumValues,
Implementation
factory StringSchema({
String? title,
String? description,
int? minLength,
int? maxLength,
String? pattern,
String? defaultValue,
StringFormat? format,
@Deprecated('Use UntitledSingleSelectEnumSchema instead.')
Iterable<String>? enumValues,
}) => StringSchema.fromMap({
Keys.type: JsonType.string.typeName,
if (title != null) Keys.title: title,
if (description != null) Keys.description: description,
if (minLength != null) Keys.minLength: minLength,
if (maxLength != null) Keys.maxLength: maxLength,
if (pattern != null) Keys.pattern: pattern,
if (defaultValue != null) Keys.default_: defaultValue,
if (format != null) Keys.format: format.name,
if (enumValues != null) Keys.enum_: enumValues,
});