Enum class Null safety

An enumerated value.

This class is implemented by all types and values introduced using an enum declaration. Non-platform classes cannot implement, extend or mix in this class.

Available Extensions
Annotations
  • @Since("2.14")

Constructors

Enum()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int
A numeric identifier for the enumerated value. [...]
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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

compareByIndex<T extends Enum>(T value1, T value2) int
Compares two enum values by their index. [...]
@Since("2.15")
compareByName<T extends Enum>(T value1, T value2) int
Compares enum values by name. [...]
@Since("2.15")