Open gaowei1012 opened 4 years ago
Wrap 使用实例
Wrap(
/// 流式布局
spacing: 8.0,
/// 水平
runSpacing: 8.0,
/// 垂直
alignment: WrapAlignment.spaceAround,
children: [
RaisedButton(
onPressed: _handleClick,
child: Text('Container'),
textColor: Colors.black),
RaisedButton(
onPressed: _goToScaffold,
child: Text('Scaffold & TabBar'),
),
RaisedButton(
onPressed: _goToScaffold,
child: Text('Scaffold & TabBar'),
),
RaisedButton(
onPressed: _goToScaffold,
child: Text('Scaffold & TabBar'),
)
],
)
Column
属性
Column({
children: children,
key: key,
direction: Axis.vertical,
mainAxisAlignment: mainAxisAlignment,
mainAxisSize: mainAxisSize,
crossAxisAlignment: crossAxisAlignment,
textDirection: textDirection,
verticalDirection: verticalDirection,
textBaseline: textBaseline,
})
在使用
Row
布局时会出现,内容过长溢出报错,进而使用Wrap
布局