False positive unused_element
in Flutter
#58810
Labels
devexp-linter
Issues with the analyzer's support for the linter package
legacy-area-analyzer
Use area-devexp instead.
Describe the issue
When using latest Flutter 3.0.5, the linter warns about the
key
property as not being used on private widgets.To Reproduce

With Flutter 3.0.5 run
flutter create demo
Edit main.dart as in
Expected behavior
I would expect
key
to be blacklisted from the lintunused_element
for both private and public widgets. That is, no warnings expected from this example.It is never known beforehand when you would need to include a key as a consumer of a widget. That could include private widgets as well.
The text was updated successfully, but these errors were encountered: