0
0
Fluttermobile~5 mins

Wrap widget in Flutter - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the Wrap widget in Flutter?
The Wrap widget arranges its children in horizontal or vertical runs and automatically moves to the next line or column when there is no more space, similar to how words wrap in a paragraph.
Click to reveal answer
beginner
Which property of the Wrap widget controls the spacing between the children horizontally?
The spacing property controls the horizontal space between the children inside a Wrap widget.
Click to reveal answer
intermediate
How does the Wrap widget differ from the Row widget in Flutter?
Unlike Row, which places children in a single horizontal line and may overflow, Wrap automatically moves children to the next line when space runs out, preventing overflow.
Click to reveal answer
beginner
What does the runSpacing property do in a Wrap widget?
The runSpacing property sets the vertical space between the lines (runs) of children in the Wrap widget.
Click to reveal answer
intermediate
Can the Wrap widget arrange children vertically instead of horizontally? If yes, how?
Yes, by setting the direction property to Axis.vertical, the Wrap widget arranges children vertically and wraps horizontally.
Click to reveal answer
What happens when children in a Wrap widget exceed the available horizontal space?
AThey automatically wrap to the next line.
BThey overflow and cause an error.
CThey get clipped and hidden.
DThey resize to fit in one line.
Which property controls the vertical spacing between lines in a Wrap widget?
Aspacing
BrunSpacing
Calignment
DcrossAxisAlignment
How do you change the direction of wrapping from horizontal to vertical in a Wrap widget?
ASet <code>direction: Axis.vertical</code>
BSet <code>verticalWrap: true</code>
CSet <code>orientation: vertical</code>
DSet <code>wrapDirection: vertical</code>
Which widget would you use to prevent overflow when placing many buttons in a horizontal line?
ARow
BColumn
CWrap
DStack
What does the spacing property in a Wrap widget affect?
AVertical space between runs
BMargin outside the widget
CPadding inside children
DHorizontal space between children
Explain how the Wrap widget manages layout differently from a Row widget in Flutter.
Think about what happens when you have many items in a row that don't fit on screen.
You got /4 concepts.
    Describe the roles of spacing and runSpacing properties in the Wrap widget.
    One controls space between items in a line, the other between lines.
    You got /3 concepts.