Question: I am trying to make a custom clipper by a Custom Clipper in FLutter but I don't know how could I add some round corners in my Shape

Screenshot of required result on Left and my result on right:
[![lu](https://i.stack.imgur.com/GLoFI.png)](https://i.stack.imgur.com/GLoFI.png)

Here is my clipper code

```
class SideArrowClip extends CustomClipper<Path> {
  @override
  Path getClip(Size size) {
    final Path path = Path();
    final double startMargin = size.width / 14;
    final double s1 = size.height * 0.4;
    final double s2 = size.height * 0.6;
    print('S1:$s1 SH:${size.height / 2} S2:$s2');
    path.lineTo(startMargin, 0);
    path.lineTo(startMargin, s1);
    path.lineTo(0, size.height / 2);
    path.lineTo(startMargin, s2);
    path.lineTo(startMargin, size.height);
    path.lineTo(size.width, size.height);
    path.lineTo(size.width, 0);
    path.close();
    return path;
  }

  @override
  bool shouldReclip(CustomClipper<Path> oldClipper) {
    return true;
  }
}

```

Answer: 
I used `addRRect(RRect.fromRectAndRadius` for rounded rectangle

```
import 'package:flutter/material.dart';

    class SideArrowClipper extends CustomClipper<Path> {
      @override
      Path getClip(Size size) {
        final double width = size.width;
        final double height = size.height;
        final double startMargin = width / 14;

        final double s1 = height * 0.3;
        final double s2 = height * 0.7;
        final Path path = Path()
          ..addRRect(RRect.fromRectAndRadius(
              Rect.fromLTWH(startMargin, 0, width-startMargin, height),
              const Radius.circular(5)))
          ..lineTo(startMargin, s1)
          ..lineTo(0, size.height / 2)
          ..lineTo(startMargin, s2)
          ..close();
        return path;
      }

      @override
      bool shouldReclip(CustomClipper<Path> oldClipper) {
        return oldClipper != this;
      }
    }

```
I would recommend having a look at this [flutter\_custom\_clippers](https://github.com/lohanidamodar/flutter_custom_clippers) plugin. This plugin allows you to use various interesting shapes such as the `MessageClipper()` shown in the image below. If rotated 90 degrees, this could suit your needs.

Alternatively, you could put together a `TriangleClipper()` and a simple `Container()` with an oval border to give rounded edges.

As shown in the example in the link above it looks something like this:

```
ClipPath(
  clipper: MessageClipper(borderRadius: 16),
  child: Container(
    height: 200,
    decoration: BoxDecoration(
      borderRadius: BorderRadius.all(Radius.circular(16.0)),
      color: Colors.red,
    ),
    child: Center(child: Text("MessageClipper()")),
),

```

[![A few shapes available from the plugin](https://i.stack.imgur.com/a8zIn.png)](https://i.stack.imgur.com/a8zIn.png)