I want to shape an image like this Flutter

Issue

I want to shape an image like this

ClipRRect(
    child: Image.asset(
        'lib/assests/shopping.jpg'),
  
    borderRadius: BorderRadius.circular(18.0),
  
),

Solution

Like this,

ClipRRect (
  borderRadius: BorderRadius.circular(5.0),
  child: Image.Asset('path')
            width: 300,
            height: 300,
            fit: BoxFit.cover,

          )

Answered By – Manishyadav

Answer Checked By – Candace Johnson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.