title: How to create a custom container with rounded edges in flutter?
body: <p>I am trying to create a custom container with round edges but not able to make the corners round. <a href="https://i.stack.imgur.com/cbFUr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cbFUr.png" alt="current image" /></a>
  I just want to make the corners of green container round.</p>
  <pre><code>class MyPainter extends CustomPainter {
    @override
    void paint(Canvas canvas, Size size) {
      var paint = Paint()
        ..color = Colors.green.withOpacity(0.8)
        ..strokeWidth = 5
        ..strokeCap = StrokeCap.round;
  
      final shapeBounds = Rect.fromLTRB(0, 0, size.width, size.height);
  
      final path = Path()
        ..moveTo(shapeBounds.left + 10, shapeBounds.top) //3
        ..lineTo(shapeBounds.bottomLeft.dx + 10,shapeBounds.bottomLeft.dy) 
        ..lineTo(shapeBounds.bottomRight.dx,shapeBounds.bottomRight.dy - size.height * 0.12)
        ..lineTo(shapeBounds.topRight.dx - 20,
            shapeBounds.topRight.dy + size.height * 0.12) //7
        ..close();
  
      canvas.drawPath(path, paint);
  
    }
  
    @override
    bool shouldRepaint(CustomPainter oldDelegate) {
      // TODO: implement shouldRepaint
      return false;
    }
  }
  </code></pre>