Complete the code to make the child widget fill the available space horizontally using Expanded.
Row(children: [Expanded(child: Container(color: Colors.blue, width: [1], height: 50))])
Using double.infinity for width inside Expanded makes the container fill all available horizontal space.
Complete the code to make the Flexible widget allow its child to shrink if needed.
Flexible(flex: 2, fit: [1], child: Container(color: Colors.red, width: 100, height: 50))
FlexFit.loose lets the child be smaller than the available space, allowing it to shrink.
Fix the error in the code by choosing the correct widget to wrap the child for flexible space allocation.
Row(children: [[1](child: Container(color: Colors.green, width: 50, height: 50))])
Flexible allows flexible space allocation without forcing full expansion, suitable here.
Fill both blanks to create a Row where the first child takes twice the space of the second child using Expanded.
Row(children: [Expanded(flex: [1], child: Container(color: Colors.orange, height: 50)), Expanded(flex: [2], child: Container(color: Colors.purple, height: 50))])
The first Expanded has flex 2, the second has flex 1, so the first child gets twice the space.
Fill all three blanks to create a Column with Flexible children where the first child can shrink, the second fills tightly, and the third shrinks.
Column(children: [Flexible(fit: [1], flex: [2], child: Container(color: Colors.yellow, height: 50)), Flexible(fit: [3], flex: 1, child: Container(color: Colors.blueGrey, height: 50)), Flexible(flex: 1, child: Container(color: Colors.teal, height: 50))])
The first Flexible uses FlexFit.loose and flex 2 to allow shrinking. The second uses FlexFit.tight and flex 1 to fill tightly.