How to get rid of const keyword in static widget - Flutter Tutorial - Flutter_Linter
492 views
·
Sep 30, 2021
Visit Channel:protocoderspoint.com
Hi Guys
If you have upgraded your flutter SDK version to 2.5.0 you might been seeing a warning been shown on every widget that use static data to add 'const' modifier at the beginning on the widget
https://protocoderspoint.com/remove-const-keyword-flutter-linter-rules/
This is because by default we now have the flutter_lints rules.
It is a good practive using the const keyword. However if you fill like removing it, you can edit your analysis_options.yaml file and add the following:
linter:
rules:
prefer_const_constructors : false
and then run a command 'dart fix'
Support Proto Coders Point: https://www.buymeacoffee.com/rajatpalankar
_______________________________________________
Comment below for any queries š
Follow and support me:
š¦ Twitter: https://twitter.com/rajatpalankar
š¬ Facebook: https://www.facebook.com/protocoderspoint/
šø Instagram: https://www.instagram.com/protocoderspoint/
Be sure to ask for help in the comments if you need any. Suggestions for future Flutter tutorials are also very welcome! :)
For mobile application development keep learning freely from proto coders point
Visit: https://protocoderspoint.com/
Show More
Show LessComments
loading text loading
loading text loading
loading text
loading text loading
loading text
loading text loading
loading text
loading text loading
loading text