anchor.diff:    }
   
     @override
  -  void visitCompilationUnit(CompilationUnit node) {
  -    pubspecFile = locatePubspecFile(node);
  -  }
  -
  -  @override
     void visitImportDirective(ImportDirective node) {
  -    if (shouldValidateUri) {
  -      var uriString = node.uri.stringValue;
  -      if (uriString != null && isWebUri(uriString)) {
  -        rule.reportLint(node);
  -      }
  +    var uriString = node.uri.stringValue;
  +    if (uriString != null && isWebUri(uriString)) {
  +      rule.reportLint(node);
       }
     }
   }
  
positive.code: }
  
  class AvoidWebLibrariesInFlutter extends LintRule implements NodeLintRule {
    AvoidWebLibrariesInFlutter()
        : super(
              name: 'avoid_web_libraries_in_flutter',
  
negative.code:             maturity: Maturity.stable,
              group: Group.errors);
  
    bool hasFlutterDep(File? pubspec) {
      if (pubspec == null) {
        return false;
      }
  
      YamlMap parsedPubspec;
      try {
        var content = pubspec.readAsStringSync();
        parsedPubspec = _parseYaml(content);
        // ignore: avoid_catches_without_on_clauses
      } catch (_) {
  