fix(di): do not use exceptions to detect if reflection is enabled
This commit is contained in:
@ -8,6 +8,10 @@ import 'platform_reflection_capabilities.dart';
|
||||
class ReflectionCapabilities implements PlatformReflectionCapabilities {
|
||||
ReflectionCapabilities([metadataReader]) {}
|
||||
|
||||
bool isReflectionEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
Function factory(Type type) {
|
||||
ClassMirror classMirror = reflectType(type);
|
||||
MethodMirror ctor = classMirror.declarations[classMirror.simpleName];
|
||||
|
Reference in New Issue
Block a user