StringSchema constructor

StringSchema({
  1. String? description,
  2. StringSchemaFormat? format,
  3. int? maxLength,
  4. int? minLength,
  5. String? title,
  6. String? defaultValue,
  7. Map<String, Object?>? extra,
})

Implementation

StringSchema({
  String? description,
  StringSchemaFormat? format,
  int? maxLength,
  int? minLength,
  String? title,
  String? defaultValue,
  Map<String, Object?>? extra,
}) : super.build({
        ...?extra,
        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),
        'type': 'string',
        if (defaultValue != null) 'default': $encode(defaultValue),
      });