我的小部件树看起来像这样:
showModalBottomSheet(... => WidgetTree()); // this symbolizes that I pass exactly what you can see below into the builder function
// WidgetTree
Row(
children: [
Text('some string') // if this string is long enough, it will overflow instead of displaying on a second line
]
);
在上面你可以看到模态底部表。
正如你所看到的,Text
不会在下一行扩展,就像在其他场景中一样,但我得到了RenderFlex OVERFLOWING
错误。
您可以使用Wrap小部件:
// WidgetTree
Wrap(
children: [
Text('some string') // if this string is long enough, it will overflow instead of displaying on a second line
]
);