Flutter: Card's RoundedRectangleBorder not working in Flutter Web?

Issue

I tried to design some sample in Flutter Web

There is a issue that I can’t apply RoundedRectangleBorder to a card because it’s not shown

screenshot

See the above image where the main Card only having sharp borders . Why ?

Below my Code :

https://gist.github.com/RageshAntony/8ee93d338aec9e352f71c14f0c84f734

Please help

Solution

Add a Container with a white background to your Card as follows

Card(
     shape: RoundedRectangleBorder(  borderRadius: BorderRadius.circular(30.0)), // THIS NOT APPLYING !!!
     elevation: 20,
     child:Container(
       decoration: BoxDecoration(
         color: Colors.white,
         borderRadius: BorderRadius.circular(30.0),
       ),
       child:Row(
       ----------------------
       ),
),

Answered By – Meysam Asadi

Answer Checked By – Marie Seifert (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *