Closed codegrue closed 4 years ago
I would love to see you add a method to convert an enum type to a list of strings. Working code is:
List<String> toList<T>(List<T> enumValues) { List<String> enumList = enumValues.map((t) => EnumToString.parse(t)).toList(); return enumList; }
enum TestEnum { testValue1, testValue2 }; EnumToString.toList(TestEnum.values); //result = 'testValue1','testValue2',
Created a pull request with this code.
Thanks for the pull request. Publishing new version now.
I would love to see you add a method to convert an enum type to a list of strings. Working code is: