title: Flutter, How to Clip a Container Like an Arc
body: <p>i have a container i need to clip it's height and that will look like the image provided.i have tried customPaint widget also but can not able to get it working.</p>
  
  <p><a href="https://i.stack.imgur.com/fW8Jx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fW8Jx.png" alt="enter image description here"></a></p>
  
  <pre><code>      child: Container(
          decoration: BoxDecoration(
              boxShadow: [
                BoxShadow(
                  color: Colors.grey.withOpacity(0.5),
                  spreadRadius: 5,
                  blurRadius: 12,
                  offset: Offset(0, 3), // changes position of shadow
                ),
              ],
              color: ColorConstants.redColor,
              borderRadius: BorderRadius.all(Radius.circular(8))),
        ),
      ),
  </code></pre>
  
  <pre><code>  @override
    Path getClip(Size size) {
      var path = Path();
  
      path.lineTo(size.width, 0.0);
      return path;
    }
  
    @override
    bool shouldReclip(CustomClipper&lt;Path&gt; oldClipper) =&gt; true;
  }
  </code></pre>