Appearance
EnumName
extension EnumName on EnumAnnotations: @Since.new("2.15")
Access to the name of an enum value.
This method is declared as an extension method instead of an instance method in order to allow enum values to have the name name.
Properties
name extension no setter
String get nameThe name of the enum value.
The name is a string containing the source identifier used to declare the enum value.
For example, given a declaration like:
dart
enum MyEnum {
value1,
value2
}the result of MyEnum.value1.name is the string "value1".
Available on Enum, provided by the EnumName extension
Implementation
dart
String get name => _name;