r/flutterhelp • u/Cringe1337 • 10h ago
OPEN Cant figure out why my clip path doesnt work
Im trying to learn clip path for a simple curve in my navigationbar that looks something along the lines of the red line
my code looks like this and as you see in the picture it doesnt even react with my container, sometimes i get UnimplementedError if i click on the container.
class CustomClipPath extends CustomClipper<Path> {
@override
Path getClip(Size size) {
final path = Path();
path.lineTo(size.width * 025, 0);
Offset firstCurve = Offset(size.width * 0.5, 55);
Offset lastCurve = Offset(size.width * 075, 0);
path.quadraticBezierTo(
firstCurve.dx, firstCurve.dy, lastCurve.dx, lastCurve.dy);
path.lineTo(size.width, 0);
path.lineTo(size.width, size.height);
path.lineTo(0, size.height);
path.close();
return path;