Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LateInitializationError: Field 'paintingOrderList' has not been initialized. #27

Open
harryhasai opened this issue Mar 7, 2024 · 2 comments

Comments

@harryhasai
Copy link

首次使用, 使用场景如下:
在弹窗里加了个ConstraintLayout, 弹窗使用的是SmartDialog,代码如下:
Future<bool?> showUContractEnableDialog() {
// var centerLine = cId("centerLine");
return SmartDialog.show(
alignment: Alignment.center,
builder: (context) {
return Container(
width: double.infinity,
height: 300,
margin: const EdgeInsets.only(left: 54, right: 54),
padding: const EdgeInsets.only(left: 17, right: 17),
decoration: BoxDecoration(
color: ColorStyle.minePageCardBg,
borderRadius: BorderRadius.circular(9)),
child: ConstraintLayout(
// width: matchParent,
// height: wrapContent,

      children: [
        Text(
          "阿达斯大所大多",
          style: TextStyle(fontSize: 15),
        ).applyConstraint(
          // id: centerLine,
          left: parent.left,
          right: parent.right,
        ),
      ],
    ),
  );
},

);
}

出现如下报错:
image

请问一下大佬如何解决这个问题

@hackware1993
Copy link
Owner

往上翻,最根源的错误在最上面。

@harryhasai
Copy link
Author

哦 是因为没有垂直的约束吧,, 确实是大意了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants