Is there a performance difference between SizedBox
and Padding
when applying distance inside Column and Row.
Here is an example:
child: Column(
children: <Widget>[
SizedBox(
height: 30.0,
),
ProfileAvatar(
photoUrl: vo.photoUrl,
height: 90.0,
),
or this
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 30.0),
),
ProfileAvatar(
photoUrl: vo.photoUrl,
height: 90.0,
),
Which one should be preferred, or recommended by the flutter team?
I think SizedBox
make code easier to read by flatten nested lines of code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With