[Super parameters] Super Key
for Widget
s
#48985
Labels
analyzer-warning
Issues with the analyzer's Warning codes
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Describe the issue
When I was trying to migrate the
key
parameter to a super parameter, I got a linter hint that the key is never used.Before:
After:
Could it be a false-positive? But the
_MethodListView
is a private class here, so it could be somehow valid in this case.Expected behavior
I expected the
key
here not to be detected as unused, as providing thekey
parameter is a preferred rule in Flutter. And the previous style is valid since thekey
is actually used in thesuper
call.The text was updated successfully, but these errors were encountered: