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 toString
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 valuesT
and the name of an enumerator valueitem
, returns the matching enumerator value,orDefault
.