i need litle help
amjadalfawal opened this issue · 1 comments
amjadalfawal commented
I'm trying to build rtl version. how to mirror this clipper any helps?
oval-right-clipper i need oval-left-clipper
@OverRide
Path getClip(Size size) {
var path = Path();
path.lineTo(0, 0);
path.lineTo(size.width - 40, 0);
path.quadraticBezierTo(
size.width, size.height / 4, size.width, size.height / 2);
path.quadraticBezierTo(size.width, size.height - (size.height / 4),
size.width - 40, size.height);
path.lineTo(0, size.height);
return path;
}
lohanidamodar commented
Also please check out the Flutter Custom Clippers library. It has this and many more other clippers that you can use.
Here, use this...
@override
Path getClip(Size size) {
var path = Path();
path.lineTo(0, 0);
path.lineTo(40, 0);
path.quadraticBezierTo(
0, size.height / 4, 0, size.height/2);
path.quadraticBezierTo(
0, size.height - (size.height / 4), 40, size.height);
path.lineTo(size.width, size.height);
path.lineTo(size.width, 0);
return path;
}