I have top & bottom text.
I want to add padding for top text, but Padding applied for bottom text too.
Why does it happen?
return Scaffold(
body: SafeArea(
child: Column(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 30.0,
horizontal: 80.0,
),
child: Column(
children: [
Text('Top text'),
],
),
),
),
Text('Footer text'),
],
),
),
);
CodePudding user response:
add crossAxisAlignment : CrossAxisAlignment.start
for the column widget. By default it aligns to the center.