We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1f9170 commit 97038d8Copy full SHA for 97038d8
1 file changed
lib/src/lints/avoid_using_api/avoid_using_api_linter.dart
@@ -331,7 +331,12 @@ class AvoidUsingApiLinter {
331
return;
332
}
333
334
- final sourcePath = enclosingElement.library2?.uri.toString() ?? '';
+ final libSource = enclosingElement.library2;
335
+ if (libSource == null) {
336
+ return;
337
+ }
338
+
339
+ final sourcePath = libSource.uri.toString();
340
if (!_matchesSource(sourcePath, source)) {
341
342
0 commit comments