Is it intentional to throw an exception for every enum that does not provide a custom value?
_getCustomMapping now throws "has no instance getter 'value'" exception here:
static String? _getCustomMapping(dynamic enumItem) {
try {
// Access the value property if it exists
final value = (enumItem as dynamic).value as String?;
return value;
} catch (_) {
return null;
}
}
This has slowed my app down so much while debugging Throwing an exception for every enum without custom mapping is a much more expensive operation than doing some other dynamic checking that does throw exceptions. I recently upgraded my flutter to new stable version and updated a bunch of pubs including this one. Now my app crawls through loading json files that have enums...It's unusable as is, so I'll have to fork or choose a diff enum parser method.
Also it makes debugging impossible with breakpoints on All Exceptions.
Is it intentional to throw an exception for every enum that does not provide a custom value?
_getCustomMapping now throws "has no instance getter 'value'" exception here:
This has slowed my app down so much while debugging Throwing an exception for every enum without custom mapping is a much more expensive operation than doing some other dynamic checking that does throw exceptions. I recently upgraded my flutter to new stable version and updated a bunch of pubs including this one. Now my app crawls through loading json files that have enums...It's unusable as is, so I'll have to fork or choose a diff enum parser method.
Also it makes debugging impossible with breakpoints on All Exceptions.