getClip method
Returns a description of the clip given that the render object being clipped is of the given size.
Implementation
@override
Path getClip(Size size) {
final path = Path();
path.moveTo(0, 0);
path.lineTo(size.width, 0);
path.lineTo(size.width, size.height * 0.85);
// Only ONE smooth convex curve from right to left
path.quadraticBezierTo(
size.width * 0.5, // Control point at center top
size.height * 1.1, // Lower Y = deeper curve
0, // End point left
size.height * 0.85, // Same Y as right edge
);
path.lineTo(0, 0);
return path;
}