📱 Flutter
Beginner
What does the Expanded widget do?
Answer
The Expanded widget makes its child fill all available space along the main axis of its parent Row or Column. If multiple Expanded widgets are used, the flex property determines how the available space is distributed proportionally — a child with flex: 2 gets twice the space of one with flex: 1. It is essential for creating responsive layouts that adapt to different screen sizes without hardcoding dimensions.
Previous
What is the MaterialApp widget and what does it configure?
Next
What is the late keyword in Dart?