Dart 如何在showModalBottomSheet中包装文本?
我的小部件树如下所示:Dart 如何在showModalBottomSheet中包装文本?,dart,flutter,Dart,Flutter,我的小部件树如下所示: 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 over
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
]
);
在上面,您可以看到模式的底页。正如您所看到的,
文本
不会像在其他场景中那样展开到下一行,但是我得到了一个RenderFlex overflow
错误。您可以使用小部件:
太棒了,我不知道这个小部件。
// WidgetTree
Wrap(
children: [
Text('some string') // if this string is long enough, it will overflow instead of displaying on a second line
]
);