enumDeserializeFactory method
Implementation
String? enumDeserializeFactory(String providerName) {
if (!isEnum) return null;
final element = (targetType as InterfaceType).element as EnumElement;
for (final constructor in element.constructors) {
if (constructor.name == 'from$providerName') return 'from$providerName';
}
for (final constructor in element.constructors) {
if (constructor.name == 'fromJson') return 'fromJson';
}
return null;
}