anchor.diff:  }
   
   class AvoidWebLibrariesInFlutter extends LintRule implements NodeLintRule {
  +  /// Cache of most recent analysis root to parsed "hasFlutter" state.
  +  static final Map<String, bool> _rootHasFlutterCache = {};
  +
     AvoidWebLibrariesInFlutter()
         : super(
               name: 'avoid_web_libraries_in_flutter',
  
positive.code:             maturity: Maturity.stable,
              group: Group.errors);
  
    @override
    void registerNodeProcessors(
        NodeLintRegistry registry, LinterContext context) {
      var visitor = _Visitor(this);
      registry.addCompilationUnit(this, visitor);
      registry.addImportDirective(this, visitor);
    }
  }
  
  class _Visitor extends SimpleAstVisitor<void> {
    File? pubspecFile;
  
    final LintRule rule;
    bool? _shouldValidateUri;
  
    _Visitor(this.rule);
  
    bool get shouldValidateUri => _shouldValidateUri ??= checkForValidation();
  
    bool checkForValidation() {
      var file = pubspecFile;
      if (file == null) {
        return false;
      }
  
      YamlMap parsedPubspec;
      try {
        var content = file.readAsStringSync();
        parsedPubspec = _parseYaml(content);
        // ignore: avoid_catches_without_on_clauses
      } catch (_) {
  
negative.code:   }
  
    @override
    void visitImportDirective(ImportDirective node) {
      var uriString = node.uri.stringValue;
      if (uriString != null && isWebUri(uriString)) {
        rule.reportLint(node);
      }
    }
  }
  