findRequired<T> method
Find a dependency (throws if not found)
Implementation
T findRequired<T>({String? tag}) {
final result = find<T>(tag: tag);
if (result == null) {
throw ZenDependencyNotFoundException(
typeName: T.toString(),
scopeName: name ?? 'UnnamedScope',
tag: tag,
);
}
return result;
}