valuesList property
List<InterpretedEnumValue>
get
valuesList
Returns the list of enum values for the static values getter.
Populates the cache on first access during interpretation pass.
Implementation
List<InterpretedEnumValue> get valuesList {
if (_valuesListCache == null) {
if (values.length != valueNames.length) {
// This shouldn't happen if interpretation pass is correct, but safeguard.
throw StateD4rtException(
"Enum '$name' values mismatch between declaration and interpretation.");
}
// Ensure the order matches the declaration order
_valuesListCache = valueNames.map((name) => values[name]!).toList();
}
return _valuesListCache!;
}