📱 Flutter
Beginner
What is the Expanded vs Flexible widget difference?
Answer
Both Expanded and Flexible are used inside a Row or Column to control how children share space. Expanded forces its child to fill all remaining space (it uses FlexFit.tight). Flexible allows its child to be smaller than the allocated space — the child can choose its own size up to the available space (it uses FlexFit.loose by default). Use Flexible when you want the child to shrink-wrap its content but still participate in flex layout.