Skip to main content


added in: 1.15.0
Dart 3.3+
preset: recommended

Warns when an extension type has a public representation field.

Public representation fields can be accessed directly, which may lead to potential mistakes. Consider exposing only the required properties or methods.


❌ Bad:

extension type ET(String value) {} // LINT

✅ Good:

extension type ET(String _value) {}