It's time for another Flutter pop quiz! ✏🍎 In a Flutter Row with two Expanded children, what determines their widths? a) Fixed pixel values b) Equal division of remaining space c) Content size d) Parent width
@FlutterDev d) - will be equally stretched inside row parent
@FlutterDev The answer is B — The width is determined by the Expanded widget itself, meaning two Expanded widgets will equally divide the available space in the parent widget unless one of them has a greater flex value
@FlutterDev Isn’t it B and D ? If they have the same Flex factor, they’re gonna get (parent’s width - padding) / 2
@FlutterDev B because both are expanded hence 50:50 split
@FlutterDev E) the respective flex factors.
@FlutterDev Nice one — we’re struggling with proper layout in a FlutterFlow chat UI right now, and questions like this are so helpful. Going with (b)!
@FlutterDev D). They both share the space equally.
@FlutterDev I don’t know but I will do ‘Ctrl + I’ and tell Copilot what I want
@FlutterDev B. If you want different proportion then use Flexible widget and use the flex parameter
@FlutterDev That should be B. When you use expanded widget in a row they divide the remaining spaces equally among themselves
@FlutterDev x.com/add00w/status/… By the flutter’s rule of constraints, constraints go down and sizes go up, and as we know Row has no constraints for its main axis(width/horizontal) so Expand1 and Expand2 split all width into two which means the answer is b) equally divided.
@FlutterDev D. parent width. Would be equally stretched within the Row