当前位置:网站首页>RenderFlex children have non-zero flex but incoming height constraints are unbounded.
RenderFlex children have non-zero flex but incoming height constraints are unbounded.
2022-07-22 00:08:00 【It一zhai男】
在使用List
类型的组件时,如果子结点是Column
,在子组件里面使用了Expanded
,那么就可能报上述错误。
原因
因为Expanded
的作用是填充剩余空间,而当List
类型的组件可滑动方向与Expanded
方向一致时,就会出现冲突,报上述错误。比如,SingleChildScrollView
的scrollDirection
是Axis.vertical
,SingleChildScrollView
有一个子结点是Column
,因为Column
的方向也是垂直方向,那么,使用Expanded
时,就会报上述错误。SingleChildScrollView
嵌套Row
原理类似。
解决方案
知道了原因,那么解决方法就简单了。
在Column
外层套一个Container
,并设置其高度height
为具体值。
边栏推荐
- 简易消息队列实现 Nodejs + Redis =MQ
- 使用 Grafana 监控 TiDB 的最佳实践
- Best practices for monitoring tidb with grafana
- torch. jit. Trace and torch jit. Differences between scripts
- 如果想和开发少battle,那你一定要懂数据库
- Seektiger's okaleido has a big move. Will the STI of ecological pass break out?
- 2.信息收集概述
- Capacitive touch chip used in touch panel
- Cyberspace mapping
- C language simple games
猜你喜欢
Leetcode-1260: 2D mesh migration
Best practices for monitoring tidb with grafana
使用 Grafana 监控 TiDB 的最佳实践
ASM Learning Series (II)
JUC concurrent contracting
[ManageEngine] seven ways to strengthen the security of enterprise privileged access
Rare earth Developers Conference | streamnational Zhai Jia and Liu Dezhi share the road of cloud native technology transformation
If you want to develop less battle, you must understand the database
Tidb high concurrency write scenario best practices
In the software testing interview, the interviewer asks you some "difficult" questions. How will you answer them
随机推荐
Seektiger's okaleido has a big move. Will the STI of ecological pass break out?
易基因 | 简化基因组DNA甲基化测序(RRBS)实验怎么做?
NVIDIA可编程推理加速器TensorRT学习笔记(一)——开始
数据库风格的DataFrame Joins)具体是什么呢?
生信常用分析图形绘制 -- 各种类型的热图!你学会了吗?
Analyze the capabilities and scenarios of Apache pulsar, a cloud native message flow system
使用 Grafana 监控 TiDB 的最佳实践
Apachecon Asia 2022 opens registration: pulsar technology issues make a big debut
2.信息收集概述
Usage scenarios of stale read function
《天幕红尘》笔记与思考(一)一切结果都是条件的可能
JUC-内存
C language simple games
Wheel 5: qcustomplot common classes
Learn the use of mockmvc from the source code
torch. jit. Trace and torch jit. Differences between scripts
PADS画板框
JUC no lock
Explore the implementation of hash table through redis source code
《天幕红尘》笔记与思考(二)你知道别人的认识和你自己知道