相关疑难解决方法(0)

颤振 - 剪辑路径

如何创建上面的自定义clipPath小部件?(我附上了截图)

我试过了,但它不是确切的输出

快船类

class MessageClipper extends CustomClipper<Path> {
  final double borderRadius = 15;
  @override
  Path getClip(Size size) {
    double width = size.width;
    double height = size.height;
    double rheight = height - height / 3;
    double oneThird = width / 3;

    final path = Path()
      ..lineTo(0, rheight - borderRadius)
      ..cubicTo(0, rheight - borderRadius, 0, rheight, borderRadius, rheight)
      ..lineTo(oneThird, rheight)
      ..lineTo(width/2-borderRadius, height-borderRadius)
      ..cubicTo(width / 2 - borderRadius, height - borderRadius, width / 2,
          height, width / 2 + borderRadius, height - borderRadius …
Run Code Online (Sandbox Code Playgroud)

dart flutter

5
推荐指数
1
解决办法
7979
查看次数

标签 统计

dart ×1

flutter ×1