Skip to content
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

False positive unused_element in Flutter #3579

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

False positive unused_element in Flutter #3579

davidmartos96 opened this issue Aug 4, 2022 · 1 comment

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 dart-lang/sdk#49025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant