Flutter 定制裁剪器贝塞尔曲线颤振

Flutter 定制裁剪器贝塞尔曲线颤振,flutter,flutter-layout,Flutter,Flutter Layout,我目前无法绘制贝塞尔曲线 我现在得到的结果是: 我需要的输出是: 我应该在这里添加什么作为贝塞尔值来获得曲线? 自定义裁剪器的代码段为: class OnBoardingClipper extends CustomClipper<Path> { @override Path getClip(Size size) { var path = Path(); path.moveTo(0.0, size.height * 0.18); path.l

我目前无法绘制贝塞尔曲线

我现在得到的结果是:

我需要的输出是:

我应该在这里添加什么作为贝塞尔值来获得曲线? 自定义裁剪器的代码段为:

    class OnBoardingClipper extends CustomClipper<Path> {
  @override
  Path getClip(Size size) {
    var path = Path();
    path.moveTo(0.0, size.height * 0.18);
    path.lineTo(0.0, size.height);
    path.lineTo(size.width, size.height);
    path.lineTo(size.width, 0.0);
    return path;
  }

  @override
  bool shouldReclip(CustomClipper<Path> oldClipper) => false;
}
class OnBoardingClipper扩展了CustomClipper{
@凌驾
路径getClip(大小){
var path=path();
path.moveTo(0.0,size.height*0.18);
path.lineTo(0.0,大小.高度);
path.lineTo(大小.宽度,大小.高度);
path.lineTo(size.width,0.0);
返回路径;
}
@凌驾
bool shouldReclip(CustomClipper oldClipper)=>false;
}

另外,感谢您的阅读,并在格式错误时表示歉意。:-)

您可以添加一个值为
(3/4*size.width,size.height*0.18)
(size.width,size.height*0.05)的
二次贝塞尔

代码:

结果:


你帮了我很多忙。谢谢你。你真棒!
@override
  Path getClip(Size size) {
    var path = Path();
    path.moveTo(0.0, size.height * 0.18);
    path.quadraticBezierTo(
        3 / 4 * size.width, size.height * 0.18, size.width, size.height * 0.05);
    path.lineTo(size.width, size.height);
    path.lineTo(0.0, size.height);
    return path;
  }