StringSchema constructor

StringSchema({
  1. String? title,
  2. String? description,
  3. int? minLength,
  4. int? maxLength,
  5. String? pattern,
  6. String? defaultValue,
  7. StringFormat? format,
  8. @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,
});