相关错误
2024/10/3大约 1 分钟
相关错误
布局组件类错误
未使用MaterialApp作为基组件
- 如果想要使用scaffold脚手架需要使用MaterialApp作为基组件, 且对于许多组件而言必须使用scaffold脚手架
未对flex布局组件设置大小约束
- 对于flex系列的组件而言,本身是没有大小约束的,也就是说,他们本身会撑满父容器,如果父容器也是flex组件就会出现大小未指定问题
I/flutter ( 4625): EXCEPTION CAUGHT BY RENDERING LIBRARY
I/flutter ( 4625): The following assertion was thrown during performResize():
I/flutter ( 4625): Vertical viewport was given unbounded height.
I/flutter ( 4625): Viewports expand in the scrolling direction to fill their container.In this case, a vertical
I/flutter ( 4625): viewport was given an unlimited amount of vertical space in which to expand. This situation
I/flutter ( 4625): typically happens when a scrollable widget is nested inside another scrollable widget.
I/flutter ( 4625): If this widget is always nested in a scrollable widget there is no need to use a viewport because
I/flutter ( 4625): there will always be enough vertical space for the children. In this case, consider using a Column
I/flutter ( 4625): instead. Otherwise, consider using the “shrinkWrap” property (or a ShrinkWrappingViewport) to size
I/flutter ( 4625): the height of the viewport to the sum of the heights of its children.Expanded的错误使用:Incorrect use of ParentDataWidget
- Expanded、Flexible只在Row、Column等组件内使用
dart错误
有关asnyc的使用
- 对于添加了asnyc的函数如果需要等待运行结果返回值,需要添加await关键字
Getx
Getx中两个context的使用
- 对于Getx中的两个context,如果需要弹窗应该使用overlayContext
