Created
January 2, 2020 07:18
-
-
Save adityajoshi12/ba726dfcea29e833c42a90d20bc74af2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CurvedClipper extends CustomClipper<Path> { | |
| @override | |
| Path getClip(Size size) { | |
| var path = new Path(); | |
| path.lineTo(0.0, size.height - 40); | |
| path.quadraticBezierTo( | |
| size.width / 4, size.height, size.width / 2, size.height); | |
| path.quadraticBezierTo( | |
| size.width - (size.width / 4), size.height, size.width, size.height); | |
| path.lineTo(size.width, 0.0); | |
| path.close(); | |
| return path; | |
| } | |
| @override | |
| bool shouldReclip(CustomClipper<Path> oldClipper) => true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment