Prefer const literals as parameters of constructors on @immutable classes.

This Article is posted by seven.srikanth at 11/26/2022 2:14:42 AM



<p>I've got this problem while trying the below code.</p> <p>First of all this is not an error, and your program should work fine without resolving it too. But, no one likes to see some squiggly lines in their programs, right?</p> <p>However, the reason it occurred, is that all the widgets inside the List are immutable. Hence it suggests adding the const keyword in one place.</p> <p>In order to fix this issue, I have changed it as shown below.</p> <p>Hope this is helpful.</p> <p>Thanks,Srikanth</p>


Tags: flutter constant;








0 Comments
Login to comment.
Recent Comments