EnumFlag mixin

Mixin for Enum flags

Example:

enum EnumX with EnumFlag {
  one,
  two,
  three,
  four,
}

print(EnumX.one.value); // 1
print(EnumX.two.value); // 2
print(EnumX.three.value); // 4
print(EnumX.four.value); // 8
print(EnumX.one.value | EnumX.two.value); // 3
print(EnumX.one.value | EnumX.three.value); // 5
Superclass Constraints

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
Return the value of the EnumFlag
no setter

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