I have this shape enter image description here
I want to flip it to be like this
this is the original code
class CustomMenuClipper extends CustomClipper<Path> {
@override
Path getClip(Size size) {
Paint paint = Paint();
paint.color = Colors.white;
final width = size.width;
final height = size.height;
Path path = Path();
path.moveTo(0, 0);
path.quadraticBezierTo(0, 8, 10, 16);
path.quadraticBezierTo(width - 1, height / 2 - 20, width, height / 2);
path.quadraticBezierTo(width + 1, height / 2 + 20, 10, height - 16);
path.quadraticBezierTo(0, height - 8, 0, height);
path.close();
return path;
}
@override
bool shouldReclip(CustomClipper<Path> oldClipper) {
return true;
}
}
this is the github repository I don't mind if it comes to a half-circle.
I think is should be something like this:
I would not recommend this, since different devices might reproduce different behaviors. Maybe using
size.width
andsize.height
might be a better idea for responsiveness.