EnumSchema class

Enum primitive schema (SEP-1330 single- and multi-select, SEP-1034 default). enumNames provides human-readable titles parallel to values; null means untitled (clients display the raw value).

When multiSelect is true the schema is emitted as a type: "array" whose items is the enum (the user may pick several values); otherwise a type: "string" single-select enum.

Inheritance

Constructors

EnumSchema({required List<String> values, List<String>? enumNames, bool multiSelect = false, String? title, String? description, Object? defaultValue})
const
EnumSchema.fromJson(Map<String, dynamic> json)
factory

Properties

defaultValue Object?
For single-select this is a String; for multi-select a List<String>. Emitted as default (SEP-1034).
final
description String?
final
enumNames List<String>?
final
hashCode int
The hash code for this object.
no setterinherited
multiSelect bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String?
final
values List<String>
final

Methods

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

Operators

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