unused_element lint treat super.key
differently
#58740
Labels
devexp-linter
Issues with the analyzer's support for the linter package
legacy-area-analyzer
Use area-devexp instead.
When I write a Widget in Flutter, recommended practice is to add
key
parameter.IDE template is generating code like this:
This code doesn't produce any lint.
Now I update my code/templates to conform to
use_super_parameters
feature:Now, the linter reports an
unused_element
lint (because my widget is private):info: A value for optional parameter 'key' isn't ever given. (unused_element at [x] example.dart:74)
It seems the linter treat the old and new super differently to determine if a parameter is used or not.
The text was updated successfully, but these errors were encountered: