instanceFromRegistry<T extends Object> function
Implementation
T instanceFromRegistry<T extends Object>({Type? type}) {
type ??= T;
try {
return _getIt.get(type: type) as T;
} catch (_) {
throw Exception('Dependency not found in registry: $type');
}
}