Created
May 23, 2020 23:02
-
-
Save huxaiphaer/580801b4be5415ce092ba8a3954abc70 to your computer and use it in GitHub Desktop.
Revisions
-
huxaiphaer created this gist
May 23, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ class RightChatBubble extends CustomClipper<Path> { @override Path getClip(Size size) { // TODO: implement getClip Path path = new Path(); double factor = 10.0; path.lineTo(0, size.height - factor); // Curve Left bottom. path.quadraticBezierTo( 0, size.height, size.width/16 , size.height ); path.lineTo(factor , size.height + 500); //Add a nip on the right bottom // path.lineTo(size.width, size.height); path.lineTo(size.width, size.height); // curve right top path.quadraticBezierTo(size.width, 0, size.width - factor, 0); path.lineTo(factor, 0); path.lineTo(size.width, 10); // curve right top path.quadraticBezierTo(size.width, 0, size.width - factor, 0); path.lineTo(factor, 0); //curve left top path.quadraticBezierTo(0, 0, 0, 10); return path; } @override bool shouldReclip(CustomClipper<Path> oldClipper) { // TODO: implement shouldReclip return true; } }