getScopeByProvider method

ModuleScope getScopeByProvider(
  1. Type provider
)

Gets the scope of a module by one of its provider types

Throws ArgumentError if the provider is not found

Implementation

ModuleScope getScopeByProvider(Type provider) {
  final scope = _providerRegistry.getScopeByProvider(provider);
  if (scope != null) {
    return scope;
  }
  throw ArgumentError('Module with provider $provider not found');
}