📱 Flutter
Beginner
What is the SizedBox widget?
Answer
SizedBox is a simple widget with a fixed width and/or height. It is commonly used in two ways: to give a child widget specific dimensions (SizedBox(width: 200, height: 50, child: Button())), or as an empty spacer between widgets without needing a child (SizedBox(height: 16)). It is more semantically explicit than using Container with just a size, and the Flutter linter prefers it for simple spacing.
Previous
What is setState() in Flutter?
Next
What is the MaterialApp widget and what does it configure?