Files
sdk/pkg/meta
Lasse R.H. Nielsen a17099d161 Update package:meta API and docs.
Changes private types in public signatures to `Object`.
Should not change anything for code that accesses the members
directly, an unspeakable type is no different from `Object`,
unless you try to access members on it, and none of the types
have useful members, they're all of the form
`class _C {const _C();}`.

If any code tries to recognize annotation values from
the expression's *static* type, not the runtime type
of the constant value itself, such code would be affected
by this change. It's not expected that such code exists.

Updates documentation to have a single-line first paragraph
with a noun phrase describing the value ("Annotation for ...").

Updates the documentation for `visibleForTesting` to say that
you can use the annotated declaration from a `test/` file in
a different package. (You can, and it's even potentially useful.)

Some spot-wise wording changes in documentation.

Change-Id: I4e8cda477ea1c302bed7dd52bdff967e6719209b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/481121
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2026-02-18 08:06:25 -08:00
..
2026-02-18 08:06:25 -08:00
2026-02-18 08:06:25 -08:00
2026-02-18 08:06:25 -08:00

pub package package publisher

This package defines annotations that can be used by the tools that are shipped with the Dart SDK.

Library Structure

The annotations in this package are defined in two libraries.

The library in meta.dart defines annotations that can be used by static analysis tools to provide a more complete analysis of the code that uses them. Within the SDK, these tools include the command-line analyzer (dart analyze) and the analysis server that is used to power many of the Dart-enabled development tools.

The library in dart2js.dart defines annotations that provide hints to dart2js to improve the quality of the JavaScript code that it produces. These annotations are currently experimental and might be removed in a future version of this package.

Support

Post issues and feature requests on the GitHub issue tracker.

Questions and discussions are welcome at the Dart Analyzer Discussion Group.

License

See the LICENSE file.