I would like to create a card in shape of this:
The problem im currently facing is this situation:
If you watch closely u can see that the Container isnt rounded as the border. After outcommenting the border itself it seems like the Card itself is rounded but the overlying Container isnt, which is bigger than the card itself?
Do you have an idea how to fix this problem?
My Code:
@override
Widget build(BuildContext context) {
return Card(
elevation: 6,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(15.0),
// side: const BorderSide(
// color: Color.fromRGBO(255, 128, 0, 1),
// width: 2.0,
// ),
// ),
child: GestureDetector(
onTap: () => Navigator.of(context).push(
MaterialPageRoute(builder: (context) => XxxView()),
),
child: Container(
width: 130,
padding: const EdgeInsets.all(15.0),
color: const Color.fromRGBO(86, 89, 94, 1),
child: Column(children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
numberExample.toString(),
style: Theme.of(context).textTheme.bodyLarge,
//maxLines: 1,
//overflow: TextOverflow.ellipsis,
),
Icon(
icon,
color: Colors.white,
),
],
),
Text(
text,
style: const TextStyle(
fontSize: 20,
color: Colors.white,
),
),
]),
),
),
);
} }



