Schema.enumString constructor

Schema.enumString({
  1. required List<String> enumValues,
  2. String? description,
  3. String? title,
  4. bool? nullable,
})

Construct a schema for String value with enumerated possible values.

Implementation

Schema.enumString({
  required List<String> enumValues,
  String? description,
  String? title,
  bool? nullable,
}) : this(
        SchemaType.string,
        enumValues: enumValues,
        description: description,
        title: title,
        nullable: nullable,
        format: 'enum',
      );