Flutter 颤振:ClipPath()小部件中的断言失败错误

Flutter 颤振:ClipPath()小部件中的断言失败错误,flutter,flutter-layout,flutter-web,Flutter,Flutter Layout,Flutter Web,我得到了这个错误 我使用的依赖项是:flatter\u custom\u裁剪器:^1.1.1 每当我重新启动或进行热刷新时,UI都会正确构建,但几秒钟后,我在调试控制台中遇到此错误 下面是我的小部件结构 ClipPath( clipper: WaveClipperTwo(flip: true, reverse: true), child: Container( padding: EdgeInsets.all(10), width: doub

我得到了这个错误

我使用的依赖项是:
flatter\u custom\u裁剪器:^1.1.1

每当我重新启动或进行热刷新时,UI都会正确构建,但几秒钟后,我在调试控制台中遇到此错误

下面是我的小部件结构

ClipPath(
      clipper: WaveClipperTwo(flip: true, reverse: true),
      child: Container(
        padding: EdgeInsets.all(10),
        width: double.infinity,
        height: 350,
        color: Colors.black87,
        child: ...
        )
);

如何解决此错误。

我不知道实际发生了什么,但我将
ClipPath()
包装在一个容器内,并将其高度与容器内的高度相同,即350

然后我没有得到任何错误

我仍然不知道那个错误是怎么回事,如果你知道的话,请随时告诉我:)

ClipPath(
      clipper: WaveClipperTwo(flip: true, reverse: true),
      child: Container(
        padding: EdgeInsets.all(10),
        width: double.infinity,
        height: 350,
        color: Colors.black87,
        child: ...
        )
);
Container{
height: 350,
child: ClipPath(
      clipper: WaveClipperTwo(flip: true, reverse: true),
      child: Container(
        padding: EdgeInsets.all(10),
        width: double.infinity,
        height: 350,
        color: Colors.black87,
        child: ...
        )
    ),
);