Before enums were available in Dart I wrote some cumbersome and hard to maintain code to simulate enums and now want to simplify it. I need to get the value of the enum as
Create a class to help:
class Enum { Enum._(); static String name(value) { return value.toString().split('.').last; } }
and call:
Enum.name(myEnumValue);