════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while applying parent data.:
Incorrect use of ParentDataWidget.
The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject, which has been set up to accept ParentData of incompatible type StackParentData.
Usually, this means that the Expanded widget has the wrong ancestor RenderObjectWidget. Typically, Expanded widgets are placed directly inside Flex widgets.
The offending Expanded is currently placed inside a Stack widget.
2条答案
按热度按时间ztmd8pv51#
那个灰色错误是因为你有一个错误,试着看看你的日志。还有你的app数据是不是来自后台?并且是的,然后请检查您是否在Androidmanifest.xml文件中添加了Internet权限
fcipmucu2#
我最近遇到了同样的问题,改变扩展/灵活的小部件为我解决了这个问题。
我的VS代码中有这样的错误
我将包含Flexible小部件的Column与Expanded小部件 Package 在一起,如下所示->
简单地删除父级扩展解决了我的问题。下面是更新后的代码: