我正在尝试创建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) 我有一张有三个容器的卡。前两个包含文本,最后一个包含文本旁边的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) 我正在使用 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)