Open
Description
https://pub.dev/documentation/meta/latest/meta/internal-constant.html says
Tools, such as the analyzer, can provide feedback if
the declaration is declared in a package's public API, or is exposed from a package's public API, or
the declaration is private, an unnamed extension, a static member of a private class, mixin, or extension, a value of a private enum, or a constructor of a private class, or
the declaration is referenced outside the package in which it is declared.
It seems the last line kind of contradicts the two others. That case should only happen if the other ones are not upheld.
Also it seems the analyzer only reports about top-level @internal
elements being exported.
// lib/src/a.dart
import 'package:meta/meta.dart';
@internal // This causes warning
class Exported {
@internal // this does not
void shouldNotBeExported() {}
}
// lib/main.dart
export 'src/a.dart'; // Warning is issued here