FieldAnnotations class

The presentation annotations of a field, extracted from its resolved schema (description, examples, required, default, readOnly). Grouped into one object to reduce the number of properties in copyWith and the number of properties passed down the chain.

Constructors

FieldAnnotations({String? description, List<Object?>? examples, bool? required, PresenceValue<Object?> defaultValue = const PresenceValue.absent(), bool readOnly = false})
Creates the annotations bundle.

Properties

defaultValue → PresenceValue<Object?>
The schema's default; absent when the schema declares none.
final
description → String?
The schema's description, shown as the field's helper text.
final
examples → List<Object?>?
The schema's examples, offered by editors that support a dropdown.
final
hashCode → int
The hash code for this object.
no setterinherited
readOnly → bool
Whether the field must not be edited: the schema's readOnly, or a const-pinned value (see JsonHandlerRegistry for the exact rule).
final
required → bool?
Whether the parent schema lists this field in required; null when the context does not say (e.g. a root field).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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