How to get rid of const keyword in static widget - Flutter Tutorial - Flutter_Linter

preview_player
Показать описание
#flutter #appdevelopment #dart

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

This is because by default we now have the flutter_lints rules.

linter:
rules:
prefer_const_constructors : false

and then run a command 'dart fix'

_______________________________________________
Comment below for any queries 😀
Follow and support me:

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
Рекомендации по теме
Комментарии
Автор

idk how to appreciate, u saved my day, hope u get all u want in this life, ameen

pudidamdam
Автор

I was thinking how to solve that pest obstacle, thank you for the solution ✌

sbasalan
Автор

Thank you very much you saved me <3 <3 Really thank you

kareemsameh
Автор

Thank you sir please make Paytm integration tutorials

shashikantchandankhede
Автор

If you care about performance you should be happy to get this warning. You should instead set up the IDE to add the const automatically for you. If you already know that then you have obligation to inform your viewers accordingly. Using constant is the key to performance.

DigitalDesignET
Автор

i updated flutter 2.5.3 but i don't see that const warning display in android studio. Now, I want to display that warning, how do I do that?, hope you help

longnguyenduc