我的小部件树如下:
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
错误。
答案 0 :(得分:1)
您可以使用Wrap小部件:
// WidgetTree
Wrap(
children: [
Text('some string') // if this string is long enough, it will overflow instead of displaying on a second line
]
);