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}) {
var name = enumValue.toString();
var period = name.indexOf('.');
return recase(name.substring(period + 1));
}