相关疑难解决方法(0)

Flutter:RenderBox未被布置

我正在尝试创建ListView,但是当我导入list_form.dart类时,出现此错误。也许我在布局上犯了一些错误,因为如果尝试在主文件中运行它,我不会得到此错误。

这是错误:

    I/flutter (12956): ??? EXCEPTION CAUGHT BY RENDERING LIBRARY ??????????????????????????????????????????????????????????
I/flutter (12956): The following assertion was thrown during performResize():
I/flutter (12956): Vertical viewport was given unbounded height.
I/flutter (12956): Viewports expand in the scrolling direction to fill their container.In this case, a vertical
I/flutter (12956): viewport was given an unlimited amount of vertical space in which to expand. This situation
I/flutter (12956): typically happens when a scrollable widget is nested inside another scrollable widget.
I/flutter (12956): If this widget …
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-layout

19
推荐指数
7
解决办法
2万
查看次数

如何解决卡片小部件中的“ RenderBox未布局:”

我有一张有三个容器的卡。前两个包含文本,最后一个包含文本旁边的TextFormField。所以我要排成一排,将两者保持在一起。唯一的事情是,当我添加TextFormField小部件时,它没有出现并且控制台抛出错误

??? EXCEPTION CAUGHT BY RENDERING LIBRARY 
??????????????????????????????????????????????????????????
I/flutter (14101): The following assertion was thrown during 
performLayout():
I/flutter (14101): BoxConstraints forces an infinite width.
I/flutter (14101): These invalid constraints were provided to 
RenderRepaintBoundary's layout() function by the
I/flutter (14101): following function, which probably computed the invalid 
constraints in question:
I/flutter (14101):   _RenderDecoration._layout.layoutLineBox 
(package:flutter/src/material/input_decorator.dart:750:11)
I/flutter (14101): The offending constraints were:
I/flutter (14101):   BoxConstraints(w=Infinity, 0.0<=h<=100.0)



I/flutter (14101): Another exception was thrown: RenderBox was not laid out: 
RenderPadding#150b0 relayoutBoundary=up3 NEEDS-PAINT
I/flutter (14101): Another …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-layout

7
推荐指数
4
解决办法
1万
查看次数

Flutter 又抛出了一个异常:RenderBox 没有布局:RenderRepaintBoundary#eaea6 NEEDS-LAYOUT NEEDS-PAINT

我正在使用 SingleChildScrollView 和 Column 来显示 swiper 和 gridview。

如果我在我的专栏中使用其他一些小部件,如文本、图像,则该应用程序显示正常。但是我的swiper和gridview无法显示,报错:

I/flutter ( 4687): ??? EXCEPTION CAUGHT BY RENDERING LIBRARY ??????????????????????????????????????????????????????????
I/flutter ( 4687): The following assertion was thrown during performLayout():
I/flutter ( 4687): RenderFlex children have non-zero flex but incoming height constraints are unbounded.
I/flutter ( 4687): When a column is in a parent that does not provide a finite height constraint, for example if it is
I/flutter ( 4687): in a vertical scrollable, it will try to shrink-wrap its children …
Run Code Online (Sandbox Code Playgroud)

dart flutter

6
推荐指数
1
解决办法
9310
查看次数

标签 统计

flutter ×3

dart ×2

flutter-layout ×2