Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dart 如何在showModalBottomSheet中包装文本?_Dart_Flutter - Fatal编程技术网

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
  ]
);