我是Flutter的初学者,已经学会了如何处理在屏幕从桌面电脑大小到平板和手机大小切换时的大小调整和文本渲染。但是我想了解当我在同一屏幕模式下缩小屏幕尺寸时,如何更改大小或弹性内容。
例如 -
return Container(
child: new Row(
children: <Widget>[
new Column(
children: <Widget>[new Text("Hello World")],
),
new Column(
children: <Widget>[
new Text(
"This is a long text this is a long test this is This is a long text this is a long test this is This is a long text this is a long test this is This is a long text this is a long test this is This is a long text this is a long test this is This is a long text this is a long test this is ")
],
)
],
),
);
在这种情况下,当我试图将屏幕尺寸从台式机减小到平板电脑时,就会出现溢出异常。请指导我如何处理。
Flexible
或Expanded
widget 包装你的小部件,并在Flexible
或Expanded
widget 内部使用 flex 属性。 - Kaveh Karami