EnumToIntConverter class

A Converter that converts an Enum to an int.

Example:

final converter = EnumToIntConverter();
print(converter.convert(Enum.value)); // prints: 0
Implemented types

Constructors

EnumToIntConverter()

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

convert(Enum source) int
A Converter that converts an Enum to an int.
override
getPackageName() String
Represents an abstraction for identifying the package that an object, resource, or service belongs to.
inherited
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