Assigning values to Flutter widgets

Viewed 31

Sizedbox, container and similar widgets border radius, height, width is better to give int value or double? How does this affect the speed and quality of the program?

Which is better

enter image description here

enter image description here

1 Answers

It does not matter, in this specific example. The Container constructor takes double? for width and height so if you are providing integers, they will just be converted into double by the compiler when compiling the application. So no difference at all when running the program.

Related