EnumHelper class

Provides a collection of methods that help when working with enums.

Constructors

EnumHelper()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getByIndex<T>(List<T> values, int index) → T
getEnum<T>(String enumName, List<T> values) → T
getIndexOf<T>(List<T> values, T value) int
getName<T>(T enumValue, {String recase(String value) = reCase}) String
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.
reCase(String value) String