getName<T> static method
Returns the Enum name without the enum class. e.g. DayName.Wednesday becomes Wednesday. By default we recase the value to Title Case. You can pass an alternate method to control the format.
Implementation
static String getName<T>(T enumValue,
{String Function(String value) recase = reCase}) {
String name = enumValue.toString();
int period = name.indexOf('.');
return recase(name.substring(period + 1));
}