ProviderViewContext constructor

ProviderViewContext(
  1. CompileDirectiveMetadata component,
  2. SourceSpan sourceSpan
)

Implementation

ProviderViewContext(this.component, this.sourceSpan) {
  viewQueries = _getViewQueries(component);
  viewProviders = CompileTokenMap<bool>();
  var normalizedViewProviders = _normalizeProviders(
    component.viewProviders,
    sourceSpan,
  );
  // Deduplicate providers by token.
  for (var provider in normalizedViewProviders) {
    if (viewProviders.get(provider.token!) == null) {
      viewProviders.add(provider.token!, true);
    }
  }
}