Enum class abstract interface

An enumerated value.

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

Available Extensions
Annotations
  • @Since("2.14")

Constructors

Enum()

Properties

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

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

compareByIndex<T extends Enum>(T value1, T value2) int
Compares two enum values by their index.
compareByName<T extends Enum>(T value1, T value2) int
Compares enum values by name.