美文网首页日常Flutter
Incorrect use of ParentDataWidge

Incorrect use of ParentDataWidge

作者: 三千烦恼风_eefa | 来源:发表于2022-08-23 18:05 被阅读0次

    报错信息:

    The ParentDataWidget Positioned(left: 11.5, top: 0.0, right: 7.7, bottom: 227.4) wants to apply ParentData of type StackParentData to a RenderObject, which has been set up to accept ParentData of incompatible type FlexParentData.

    Usually, this means that the Positioned widget has the wrong ancestor RenderObjectWidget. Typically, Positioned widgets are placed directly inside Stack widgets.
    The offending Positioned is currently placed inside a Column widget.

    The ownership chain for the RenderObject that received the incompatible parent data was:
    ConstrainedBox ← Container ← GMic2SingLyricWidget ← Positioned ← PositionedTransition ← Column ← Padding ← ConstrainedBox ← Container ← GMic2SingWidget ← ⋯

    解决方案:

    image.png

    相关文章

      网友评论

        本文标题:Incorrect use of ParentDataWidge

        本文链接:https://www.haomeiwen.com/subject/dosogrtx.html