- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
在列中添加行时出现错误。我收到以下错误:
I/flutter ( 6449): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 6449): The following assertion was thrown during performLayout():
I/flutter ( 6449): BoxConstraints forces an infinite width.
I/flutter ( 6449): These invalid constraints were provided to RenderAnimatedOpacity's layout() function
我的代码也供引用:
return new Scaffold(
backgroundColor: whiteColor,
body: new Column(
children: <Widget>[
imgHeader,
lblSignUp,
txtEmail,
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
txtFirstName,
txtLastName
],
),
],
),
);
最佳答案
如果您在 Row
中使用 TextField
,那么您需要使用 Flexible
或 Expanded
。
此答案中提供了更多详细信息。
关于flutter - BoxConstraints 强制无限宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52442724/
我想通过在函数中使用上下文来获取约束(在构建方法之前)。 在build()方法中,如果我们一开始就使用LayoutBuilder,它提供了child可以占用的constraints。那有没有可能直接通
在这个类中作为一个小部件,我使用动画来显示和隐藏,当我通过单击多次显示或隐藏时,有时我会收到此错误: BoxConstraints has a negative minimum width.The o
child:Column( children: [ Container( height: double.infinity, width: 100.0, color: Col
在列中添加行时出现错误。我收到以下错误: I/flutter ( 6449): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════
在flutter的Container小部件中, 给它一个固定的 height 和 width 和为它提供 BoxConstraints constraints< 有什么区别 属性?。 它是提供宽度 +
我正在尝试实现带有复选框的 ListView,但我收到一条错误消息,提示 BoxConstraints 强制无限宽度。这是我的代码: body: ListView.builder(itemCount:
我正在尝试模仿与附加图像类似的搜索 View ,但出现以下错误。我可以使用 ListTile 实现此目的,但我无法为图标或 TextField 设置填充。所以我正在尝试使用 Row 小部件来实现这一点
TL;DR - 如何实现 shrinkWrap = true在ReorderableListView ? 我试图创建一个 ReoderableListView与 Column ← Column ← P
文字未呈现在应用程序的主页上,这是我遇到问题的地方。我是新手,因此是新手。希望有人可以提供一些见解,或者根据我遇到的错误调整代码。 为了进一步说明,当我启动“ flutter ”时将显示此页面。将显示
不确定为什么会抛出错误 BoxConstraints forces an infinite height return Scaffold( body: Column( children:
我是一名优秀的程序员,十分优秀!