Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are the differences between SizedBox Vs Container?
Home
Flutter
What are the differences between SizedBox Vs Container?
0
votes
asked
Aug 8, 2023
in
Flutter
by
DavidAnderson
What are the differences between SizedBox Vs Container?
flutter-interview-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Aug 8, 2023
by
DavidAnderson
Container:
In this parent widget, multiple child widgets can be easily controlled and handled by adjusting their size, padding, and color efficiently. We can wrap a widget in a container widget if it needs any styling, like a color, a shape, or a size constraint, etc.
SizedBox:
This is a specific size box. It does not allow us to set the widget's color or decoration, unlike Container. In this case, we only need to resize the widget that is passed as a child. In other words, it forces its child widget to have a specific size.
...