Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TopFeedsWaveCurve extends CustomClipper<Path> {
- TopFeedsWaveCurve();
- final double halfInnerWidth = innerWidth / 2;
- final double _heightCurve = 40.0;
- final double _barHeight = 20.0;
- @override
- Path getClip(Size size) {
- var path = Path();
- path.moveTo(0.0, 0.0);
- path.lineTo(0.0, _barHeight);
- path.lineTo(size.width / 2 - halfInnerWidth - _barHeight, _barHeight);
- path.cubicTo(size.width / 2 - halfInnerWidth, _barHeight, size.width / 2 - halfInnerWidth, _heightCurve, size.width / 2 - halfInnerWidth + _barHeight,
- _heightCurve,);
- path.lineTo(size.width / 2 + halfInnerWidth -_barHeight, _heightCurve);
- path.cubicTo(size.width / 2 + halfInnerWidth , _heightCurve , size.width / 2 + halfInnerWidth, _barHeight, size.width / 2 + halfInnerWidth +
- _barHeight,15,);
- path.lineTo(size.width, _barHeight);
- path.lineTo(size.width, 0);
- return path;
- }
- @override
- bool shouldReclip(CustomClipper<Path> oldClipper) => true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement