我想在列内的小部件之间添加间距,而不对每个 SizedBox 进行硬编码并给它们一定的高度,我想直接在列上设置它但没有对齐选项起作用,我做错了什么?这是什么原因造成的?
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Submit Your Order'),
),
body: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(20.0),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, // doesnt work
children: [
InformationField(
label: 'Phone Number',
hintText: 'Type Your Phone Number',
),
InformationField(
label: 'Name',
hintText: 'Type Your Name',
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
InformationField(
label: 'Adress',
hintText: 'Neighborhood/City',
),
SizedBox(
height: 5.0,
),
RowInformationField()
],
),
],
),
),
),
),
);
}