How to Manage Space Between Column’s Children In Flutter ??

· 2 min read
How to Manage Space Between Column's Children In Flutter
How to Manage Space Between Column's Children In Flutter

Padding Widget is used to set space between Text content and defined text content area. It’s like a margin type but only applied on Text to set space between border-defined areas. So in today’s article, we will learn how to Manage Space Between Column’s Children in Flutter.

How to Manage Space Between Column’s Children In Flutter ??

You can use the Padding Widget in between that two widgets or wrap those widgets with the Padding widget.

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

Column(
  children: <Widget>[
    Widget1(),
    SizedBox(height: 10),
    Widget2(),
  ],
),

Just use padding to wrap it like this:

Column(
  children: <Widget>[
  Padding(
    padding: EdgeInsets.all(8.0),
    child: Text('Hello World!'),
  ),
  Padding(
    padding: EdgeInsets.all(8.0),
    child: Text('Hello World2!'),
  )
]);

You can put a SizedBox widget with a specific height between the widgets, like this:

Column(
  children: <Widget>[
    FirstWidget(),
    SizedBox(height: 100),
    SecondWidget(),
  ],
),

You can also use the wrap widget instead of the column widget to add space between child widgets and use the spacing property to give equal spacing between children.

Conclusion:

Thanks for being with us on a Flutter Journey!!! Don’t forget to drop your valuable feedback to keep the enthusiasm going!!

So in this article, we have been through how to manage space between column’s children in flutter.

Keep Learning!!! Keep Fluttering!!!

Do let us know if you need any assistance with flutter development.?? We would love to assist you.

FlutterAgency.com is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget GuideFlutter ProjectsCode libs and etc.

FlutterAgency.com is one of the most popular online portals dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge of Flutter.

2 comments

Leave a Reply