EnumType class ast

A custom enumeration definition.

Inheritance
Available extensions

Constructors

EnumType({required String className, required List<String> values, required List<String> valuesJSON, bool nullable = false})
Construct a new CustomType.
const

Properties

className → String
Name of this class.
finalinherited
hashCode → int
The hash code for this object.
no setteroverride
noneValue → String

Available on EnumType, provided by the NoneValueBuilder extension

Return "NONE" if all enum values are uppercase or "none" if not.
no setter
nullable → bool
Bool indicator if null is allowed.
final
printDecoderMethod → String

Available on AbstractType, provided by the DecoderMethod extension

Output decoding method line.
no setter
printType → String

Available on AbstractType, provided by the AbstractTypeSerializer extension

Output AbstractType as dart code.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
values → List<String>
Fields of this class.
final
valuesJSON → List<String>
Fields of this class.
final

Methods

copyWith({bool? nullable, List<String>? values}) → EnumType
Copy this instance with different nullable value.
generateEnumClassBody(SquintGeneratorOptions options) → String generator

Available on EnumType, provided by the EnumType2EnumClass extension

Generate data class from CustomType.
generateEnumClassFile({SquintGeneratorOptions options = standardSquintGeneratorOptions}) → String generator

Available on EnumType, provided by the EnumType2EnumClass extension

Generate data class from EnumType.
generateJsonDecodingFile({required String relativeImport}) → String generator

Available on EnumType, provided by the JsonValueExtensionsGenerator extension

Generate deserialization method.
normalizeType(Set<EnumType> enumTypes, Set<CustomType> customTypes) → AbstractType

Available on AbstractType, provided by the AbstractTypeNormalizer extension

Normalize AbstractType by replacing any (nested Type) with the instance scanned by the analyzer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJsonNodeGetters(String key) → List<String> generator

Available on EnumType, provided by the JsonNodeEnumGenerator extension

Generate getters.
toJsonNodeSetters(String key) → List<String> generator

Available on EnumType, provided by the JsonNodeEnumGenerator extension

Generate setters.
toString() → String
A string representation of this object.
override
unwrapNestedTypes() → List<AbstractType>

Available on AbstractType, provided by the NestedTypeFinder extension

Find nested AbstractType.

Operators

operator ==(Object other) → bool
The equality operator.
override