name property

String get name

name override

Implementation

String get name {
  // if the last part of the enum is an underscore we remove it
  final enumName = toString().split('.').last;
  return enumName.endsWith('_')
      ? enumName.substring(0, enumName.length - 1)
      : enumName;
}