Stack Overflow Asked by Nitneuq on December 30, 2021
Hello I have a code like this
SizedBox(height: 10),
..._function(context, model),
SizedBox(height: 5),
if (model.bloc)
)
But after flutter upgrade I have error focus on "…"
This requires the spread-collection experiment to be enable
How can I rewrite this correctly ? Thank you
In pubspec.yaml
change environment
sdk constraints to:
sdk: ">=2.7.0 <3.0.0"
Invalidate Caches and Restart your IDE
Android Studio: File>> Invalidate Caches and Restart.
That would be enough.
Answered by Jagraj Singh on December 30, 2021
What happens when you change your environment to this:
environment:
sdk: ">=2.6.0 <3.0.0"
and also do a Flutter clean
and restart the IDE
Edited:
In the root of your project create a file named analysis_options.yaml
and add these lines to it:
analyzer:
enable-experiment:
- spread-collections
Answered by P4yam on December 30, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP