FieldSchema class

The constraints on a single field: its type, whether it must be present (isRequired), and an optional allowed set of values (an enum).

Annotations

Constructors

FieldSchema(JsonType type, {bool isRequired = true, List<Object?>? allowed})
Describes a field of type. isRequired defaults to true; pass allowed to restrict the value to a fixed set. Audited: 2026-06-12 11:26 EDT
const

Properties

allowed List<Object?>?
When non-null, the value must equal one of these (an enum constraint).
final
hashCode int
The hash code for this object.
no setterinherited
isRequired bool
Whether an absent (or null) value is an error.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type JsonType
The required value kind.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited