Been developing a flutter app and dynamicly building some containers from some Firebase data. I wanted to know if there is a way to get a onTap method for containers (or any wi
Apart from what others have said in answers, if you use Card
inside InkWell
, then InkWell
will hide away the ripply effect on Android—you can see it happening in the background but not on the card itself.
Solution to that is to create an InkWell
inside the Card
.
return Card(
child: InkWell(
child: Row(
// Row content
),
onTap: () => {
print("Card tapped.");
},
),
elevation: 2,
);
This will help you gain the ripple effect and perform the tap captures on Android too.