CustomClipper In Flutter

CustomClipper In Flutter :

CustomClipper In Flutter
 ClipPath(
                child: Container(
                    height: MediaQuery.of(c).size.height * 0.32,
                    child: AppBar(
                        centerTitle: true,
                        backgroundColor: colors[0],
                        title: Text("Custom Clipper"))),
                clipper: WC(),
              ),

class WC extends CustomClipper<Path> {
  @override
  Path getClip(s) {
    var w = s.width;
    var h = s.height;
    var p = Path();
    p.lineTo(0.0, s.height - 30);
    setPath(w * 0.05, h * 0.4, w * 0.18, h - 30, p);
    setPath(w * 0.23, h, w * 0.3, h * 0.78, p);
    setPath(w * 0.35, h * 0.6, w * 0.41, h - 80, p);
    setPath(w * 0.45, h - 40, w * 0.5, h - 80, p);
    setPath(w * 0.62, h * 0.4, w * 0.65, h * 0.65, p);
    setPath(w * 0.72, h + 50, w * 0.78, h * 0.7, p);
    setPath(w * 0.85, h * 0.35, w * 0.95, h - 65, p);
    p.lineTo(w, h);
    p.lineTo(w, 0.0);
    p.close();
    return p;
  }

  bool shouldReclip(oc) => true;
}

setPath(dx1, dy1, dx2, dy2, p) {
  p.quadraticBezierTo(dx1, dy1, dx2, dy2);
}

The flutter tutorial  is a website that bring you the latest and amazing resources of code. All the languages codes are included in this website. The languages like flutter, android, java,kotlin etc.with the help of this languages any user can develop the beautiful application

For more information about Flutter. visit www.fluttertutorial.in