UseRule constructor

UseRule(
  1. Uri url,
  2. String? namespace,
  3. FileSpan span, {
  4. Iterable<ConfiguredVariable>? configuration,
})

Implementation

UseRule(this.url, this.namespace, this.span,
    {Iterable<ConfiguredVariable>? configuration})
    : configuration = configuration == null
          ? const []
          : List<ConfiguredVariable>.unmodifiable(configuration) {
  for (var variable in this.configuration) {
    if (variable.isGuarded) {
      throw ArgumentError.value(variable, "configured variable",
          "can't be guarded in a @use rule.");
    }
  }
}