@@ -126,6 +126,20 @@ const _Factory factory = _Factory();
126
126
/// class that has this annotation is not immutable.
127
127
const Immutable immutable = Immutable ();
128
128
129
+ /// Used to annotate a declaration which should only be used from within the
130
+ /// package in which it is declared, and which should not be exposed from said
131
+ /// package's public API.
132
+ ///
133
+ /// Tools, such as the analyzer, can provide feedback if
134
+ ///
135
+ /// * the declaration is declared in a package's public API, or is exposed from
136
+ /// a package's public API, or
137
+ /// * the declaration is private, an unnamed extension, a static member of a
138
+ /// private class, mixin, or extension, a value of a private enum, or a
139
+ /// constructor of a private class, or
140
+ /// * the declaration is referenced outside the package in which it is declared.
141
+ const _Internal internal = _Internal ();
142
+
129
143
/// Used to annotate a test framework function that runs a single test.
130
144
///
131
145
/// Tools, such as IDEs, can show invocations of such function in a file
@@ -257,15 +271,15 @@ const _Virtual virtual = _Virtual();
257
271
/// * the member is referenced outside of the defining library.
258
272
const _VisibleForOverriding visibleForOverriding = _VisibleForOverriding ();
259
273
260
- /// Used to annotate a declaration was made public, so that it is more visible
261
- /// than otherwise necessary, to make code testable.
274
+ /// Used to annotate a declaration that was made public, so that it is more
275
+ /// visible than otherwise necessary, to make code testable.
262
276
///
263
277
/// Tools, such as the analyzer, can provide feedback if
264
278
///
265
279
/// * the annotation is associated with a declaration not in the `lib` folder
266
280
/// of a package, or a private declaration, or a declaration in an unnamed
267
281
/// static extension, or
268
- /// * the declaration is referenced outside of its the defining library or a
282
+ /// * the declaration is referenced outside of its defining library or a
269
283
/// library which is in the `test` folder of the defining package.
270
284
const _VisibleForTesting visibleForTesting = _VisibleForTesting ();
271
285
@@ -326,6 +340,10 @@ class _Factory {
326
340
const _Factory ();
327
341
}
328
342
343
+ class _Internal {
344
+ const _Internal ();
345
+ }
346
+
329
347
class _IsTest {
330
348
const _IsTest ();
331
349
}
0 commit comments