Closed
Description
Describe the bug
A clear and concise description of what the bug is.
If you use the stateless widget template (which I think comes from Dart-Code?) it now ends up with warnings as of the latest Flutter default template?
To Reproduce
flutter create
to start a new empty project.- Type 'stls' and let it autocomplete to the stateless widget template.
Expected behavior
Should not have any analyzer warnings.
First it gives you a warning about missing "key" parameter in constructor:
"Use key in widget constructors."
Then, once you fix that, then it gives you a new warning:
"Prefer declaring const constructors on @immutable
classes."
Versions (please complete the following information):
[√] Flutter (Channel master, 2.3.0-2.0.pre.237, on Microsoft Windows [Version 10.0.19041.928], locale en-US)
• Flutter version 2.3.0-2.0.pre.237 at C:\Users\micro\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c71e8bacfd (76 minutes ago), 2021-05-16 17:44:01 -0400
• Engine revision 0c9ffcc623
• Dart version 2.14.0 (build 2.14.0-edge.a527411e5100a0a4f48c4009087a1b988aa784af)
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.9.31205.134
• Windows 10 SDK version 10.0.19041.0