Skip to content

False positive unused_element in Flutter #58810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
davidmartos96 opened this issue Aug 4, 2022 · 1 comment
Closed

False positive unused_element in Flutter #58810

davidmartos96 opened this issue Aug 4, 2022 · 1 comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead.

Comments

@davidmartos96
Copy link
Contributor

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
image

Expected behavior
I would expect key to be blacklisted from the lint unused_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.

@davidmartos96
Copy link
Contributor Author

Duplicate #49025.

@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 19, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

2 participants