I am applying a Slidable widget on my Card widget to allow user to take do action based on their needs. However, when I slide the card the content in the card overlay the Card widget which doesn't look nice from the UI. The following is my sample code and the image attached is the output I currently obtained.
Sample Code:
Card(
child: Slidable(
endActionPane: ActionPane(motion: const DrawerMotion(), children: [
Expanded(
child: Container(
decoration: BoxDecoration(
borderRadius: const BorderRadius.only(
bottomRight: Radius.circular(10),
topRight: Radius.circular(10)),
gradient: customColors.progressBarGradient),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
IconButton(
onPressed: () {},
icon: const Icon(Icons.local_phone_rounded,
color: Colors.white)),
IconButton(
onPressed: () {},
icon: const Icon(Icons.mail_outlined,
color: Colors.white)),
IconButton(
onPressed: () {},
icon: const Icon(Icons.mail_outlined,
color: Colors.white)
],
)))
]),
child: ListTile(
dense: true,
leading: const AccountIcon(size: 42),
title: Text('KOO KIAN KEAT'),
subtitle:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text('----')
])),
));

I wrapped the whole
Cardwidget withSlidablewidget to make it slide all together. And I also wrappedSlidablewithContainerwidget which imitates card styling and will adjust the shape and color when start sliding (look at the end of the card widget when start sliding):