Created
June 12, 2019 07:54
-
-
Save umuieme/cbef03a4aeb1bc16e726be18603706a2 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
| import 'package:flutter/material.dart'; | |
| class CustomRRect extends CustomClipper<Path> { | |
| CustomRRect(); | |
| @override | |
| Path getClip(Size size) { | |
| var path = new Path(); | |
| path.lineTo(0.0, size.height/2 - 20); | |
| path.quadraticBezierTo(0.0, size.height/2, 20.0, size.height/2+20); | |
| path.lineTo(size.width - 20.0, size.height-10); | |
| path.quadraticBezierTo(size.width, size.height, size.width, size.height - 20); | |
| path.lineTo(size.width, 20.0); | |
| path.quadraticBezierTo(size.width, 0, size.width - 20.0, 0); | |
| path.lineTo(20.0, 0); | |
| path.quadraticBezierTo(0.0, 0.0, 0.0, 20.0); | |
| return path; | |
| } | |
| @override | |
| bool shouldReclip(CustomClipper<Path> oldClipper) { | |
| // TODO: implement shouldReclip | |
| return true; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment