Group: style
Maturity: stable
Dart SDK: >= 2.14.0 • (Linter v1.3.0)
Since info is static, may be staleAVOID using library private types in public APIs.
For the purposes of this lint, a public API is considered to be any top-level or member declaration unless the declaration is library private or contained in a declaration that's library private. The following uses of types are checked:
typedef F = _Private Function();
), oron
clause of an extension or a mixinBAD:
f(_Private p) { ... }
class _Private {}
GOOD:
f(String s) { ... }
To enable the library_private_types_in_public_api
lint,
add library_private_types_in_public_api
under linter > rules in your
analysis_options.yaml
file:
linter:
rules:
- library_private_types_in_public_api