0

enter image description here

how can i make this custom clipper ? i cant make it with border radius.Can anyone send code?

1 Answer 1

1

You can use this Path

class CardClipperPath extends CustomClipper<Path> {
  final double curveRadius;

  CardClipperPath({this.curveRadius = 16.0});

  @override
  Path getClip(Size size) => Path()
    ..quadraticBezierTo(0, curveRadius * .75, curveRadius, curveRadius)
    ..lineTo(size.width - curveRadius, curveRadius)
    ..quadraticBezierTo(size.width, curveRadius, size.width, curveRadius * 2)
    ..lineTo(size.width, size.height)
    ..lineTo(0, size.height);

  @override
  bool shouldReclip(covariant CardClipperPath oldClipper) => oldClipper != this;
}

enter image description here

Wrap with Stack and provide corner image.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.