Enum class

Extension that allows for enum-to-string and string-to-enum conversions

Constructors

Enum()

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

asString(dynamic value) String
Given an enumerator value value, converts it to String stripping the enumerator type, and returns the result
fromString<T>(List<T> values, String? item, {bool caseInvariant = true, T? orDefault}) → T?
Given a List of enumerator values T and the name of an enumerator value item, returns the matching enumerator value, orDefault.