registerCustomEnum static method
Register custom enum types and their fields manually. This replaces the slow introspection.
Implementation
static void registerCustomEnum(String typeName, List<String> fields,
{List<String>? values}) {
_knownEnumTypes.add(typeName);
for (final field in fields) {
_fieldToEnumType[field] = typeName;
}
if (values != null) {
_customEnumValues[typeName] = values.toSet();
}
}