EnumSchema class

The enum descriptor shared by single- and multi-select elicitation fields (spec 2025-11-25). names mirrors enumNames positionally: when present the enum is titled (each value has a display label); when null the enum is untitled (display the raw value).

Annotations
  • @immutable

Constructors

EnumSchema({required List<String> values, List<String>? names})
const
EnumSchema.fromJson(Map<String, dynamic> json)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isTitled bool
Whether this enum carries display labels.
no setter
names List<String>?
Display labels (enumNames), positionally aligned with values. Null for an untitled enum.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values List<String>
Allowed values (enum).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
titleFor(String value) String
Display label for value — the aligned enumNames entry when titled, otherwise the raw value.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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