【发布时间】:2018-06-15 13:23:40
【问题描述】:
我正在尝试在一行内显示以多行包裹的芯片和长文本行。
I want it like this, except for the label and the aligned on the same line.
我当前的代码:
return new Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
new Wrap(
spacing: 8.0,
runSpacing: 4.0,
direction: Axis.horizontal,
children: <Widget>[
new Tag(tagLabel: 'Chip1'),
new Text('This is a very, very long text that should wrap. The second line should be shown below the first chip!'),
new Chip(label: new Text('Chip2')),
new Chip(label: new Text('Chip3')),
new Chip(label: new Text('Chip4')),
new Chip(label: new Text('Chip5')),
new Chip(label: new Text('Chip6'))
],
)
],
);
有什么想法吗?
【问题讨论】:
-
目前还没有这种复杂的文本布局。只有矩形框可用。
-
WidgetSpan 帮了我大忙。请参阅this 帖子。