StringSchema constructor

StringSchema({
  1. String? title,
  2. String? description,
  3. int? minLength,
  4. int? maxLength,
  5. String? pattern,
  6. Iterable<String>? enumValues,
})

Implementation

factory StringSchema({
  String? title,
  String? description,
  int? minLength,
  int? maxLength,
  String? pattern,
  Iterable<String>? enumValues,
}) => StringSchema.fromMap({
  'type': JsonType.string.typeName,
  if (title != null) 'title': title,
  if (description != null) 'description': description,
  if (minLength != null) 'minLength': minLength,
  if (maxLength != null) 'maxLength': maxLength,
  if (pattern != null) 'pattern': pattern,
  if (enumValues != null) 'enum': enumValues,
});