getInstanceByType method
Implementation
dynamic getInstanceByType({required Type type}){
if (_registry.containsKey(type) == false) {
throw new Exception("Type $type is not registered for initialization");
} else {
final initializer = _registry[type]!;
return initializer();
}
}