如何创建上面的自定义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)