name property

String get name

The 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:

enum MyEnum {
  value1,
  value2
}

the result of MyEnum.value1.name is the string "value1".

Implementation

String get name => _name;