getPosition method

  1. @override
int getPosition()
override

This is the position of the enum field, as-is on the enum class.

Example:

final position = field.getPosition(); // Returns 1

Implementation

@override
int getPosition() => _position;