0
0
Fluttermobile~5 mins

Expanded and Flexible in Flutter - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the Expanded widget do in Flutter?
The Expanded widget tells its child to fill the available space in the main axis of a Row, Column, or Flex. It expands the child to use all leftover space.
Click to reveal answer
intermediate
How does the Flexible widget differ from Expanded?
Flexible lets its child be smaller than the available space if it wants, while Expanded forces the child to fill all the available space. Flexible gives more control over child's size.
Click to reveal answer
beginner
What is the role of the flex property in Expanded and Flexible?
The flex property is a number that tells how much space this widget should take relative to its siblings. For example, flex: 2 means twice as much space as flex: 1.
Click to reveal answer
intermediate
Can Flexible widget shrink its child smaller than its intrinsic size?
Yes, Flexible can shrink its child smaller than its intrinsic size if the child allows it. This helps when you want flexible but not forced expansion.
Click to reveal answer
beginner
Why use Expanded or Flexible inside a Row or Column?
They help control how children share space. Without them, children take only the space they need. With them, you can make children grow or shrink to fill or share leftover space nicely.
Click to reveal answer
What happens if you wrap a widget with Expanded inside a Row?
AThe widget fills all remaining horizontal space.
BThe widget shrinks to its minimum size.
CThe widget disappears.
DThe widget fills all vertical space.
Which widget allows its child to be smaller than the available space if it wants?
AFlexible
BExpanded
CContainer
DSizedBox
If two Expanded widgets have flex values 1 and 3, how is space divided?
A3/4 for first, 1/4 for second
BEqual space for both
C1/4 for first, 3/4 for second
DOnly the first gets space
Which widget forces its child to fill all available space?
AFlexible
BExpanded
CPadding
DAlign
What is the main axis in a Column?
AHorizontal
BDiagonal
CNone
DVertical
Explain the difference between Expanded and Flexible widgets in Flutter.
Think about how much space the child widget takes inside a Row or Column.
You got /3 concepts.
    Describe a real-life scenario where you would use Expanded inside a Row.
    Imagine a toolbar with a search box that should grow to fill space.
    You got /3 concepts.