Wrap简介
可以在水平或垂直方向多行显示其子widget(宽度或高度不够时自动换行)
Wrap属性概要
Wrap({
Key key,
// 设置子部件排列方向
this.direction = Axis.horizontal,
// 设置主轴方向子部件位置(居中、首尾)
this.alignment = WrapAlignment.start,
// 设置主轴方向上子部件间间距
this.spacing = 0.0,
// 设置次轴方向上子部件的分布方式(紧凑、居中、首尾、均分等)
this.runAlignment = WrapAlignment.start,
// 设置次轴方向上子部件间间距
this.runSpacing = 0.0,
// 设置主轴方向上子部件的对齐方式(居中、顶部对齐、底部对齐)
this.crossAxisAlignment = WrapCrossAlignment.start,
// 子项在横轴方向上的排列方式
this.textDirection,
// 子项在竖直方向上的排列方向
this.verticalDirection = VerticalDirection.down,
// 子部件们
List<Widget> children = const <Widget>[],
})