EnumSpec class final

Specification for enumeration types.

Inheritance

Constructors

EnumSpec({required String name, required List<EnumValueSpec> values, String? description, bool nullable = false, List<Object>? examples, bool isDeprecated = false})
Creates a new EnumSpec.
const

Properties

description String?
Optional description of this type.
finalinherited
examples List<Object>?
Example values for documentation.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isDeprecated bool
Whether this type is deprecated.
finalinherited
name String
The name of this enum type.
final
nullable bool
Whether this type accepts null values.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values List<EnumValueSpec>
The enum values.
final

Methods

asNullable() EnumSpec
Creates a copy of this spec with nullable set to true.
override
copyWith({String? name, List<EnumValueSpec>? values, String? description, bool? nullable, List<Object>? examples, bool? isDeprecated}) EnumSpec
Creates a copy with the given modifications.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withDescription(String description) EnumSpec
Creates a copy of this spec with the given description.
override

Operators

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