EnumDefinition class

A representation of a yaml file in the protocol directory defining an enum.

Inheritance

Constructors

EnumDefinition({required String fileName, required String sourceFileName, required String className, required EnumSerialization serialized, required ProtocolEnumValueDefinition? defaultValue, required List<ProtocolEnumValueDefinition> values, required bool serverOnly, required TypeDefinition type, List<String> subDirParts = const [], List<String>? documentation, List<EnumPropertyDefinition> properties = const [], String? sharedPackageName})
Create a new EnumDefinition.

Properties

className → String
finalinherited
defaultValue → ProtocolEnumValueDefinition?
The default value of the enum when parsing of the enum fails.
final
documentation → List<String>?
The documentation for this enum, line by line.
final
fileName → String
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
isEnhanced → bool
Whether this is an enhanced enum with properties.
no setter
isSharedModel → bool
Whether this model is declared in a shared package. Such models are not generated on the server or client side, but on its own shared package.
no setterinherited
properties → List<EnumPropertyDefinition>
Properties for enhanced enums with custom fields.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serialized → EnumSerialization
The type of serialization this enum should use.
final
serverOnly → bool
finalinherited
sharedPackageName → String?
finalinherited
sourceFileName → String
finalinherited
subDirParts → List<String>
finalinherited
type → TypeDefinition
finalinherited
values ↔ List<ProtocolEnumValueDefinition>
All the values of the enum. This also contains possible documentation for them.
getter/setter pair

Methods

fileRef() → String
Generate the file reference String to this file.
inherited
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