Answers for "adding space container and child flutter"

1

text should come below if space not available row flutter

//wrap with expanded which text you want to come below if space not availabe in top row
Row(
	mainAxisAlignment: MainAxisAlignment.spaceBetween,
    children: [
    Expanded(
    child: Text(
	    mainProduct.name,
    	),
    ),
    secondWidget(),
    ],
),
Posted by: Guest on February-26-2021
1

flutter widget for space

SizedBox widget can be use in between two widget to add space between two widget
and it makes code more readable than padding widget.

Column(
  children: <Widget>[
    Widget1(),
    SizedBox(height: 10),
    Widget2(),
  ],
),
Posted by: Guest on March-15-2021

Code answers related to "adding space container and child flutter"

Code answers related to "Dart"

Browse Popular Code Answers by Language