How to make a card widget touchable in Flutter?

Viewed 1882

I am currently making an app with lists of a Card widgets. This is a code snippet:

new GestureDetector(
        onLongPress: () {
          showAlert(); 
        //pops up an AlertDialog
        },
        child: new Card(child: new Text("Hello"))
)

Is it possible to make the Card widget touchable, so the user can feel/see that the card is (long)tapped? I am searching for an 'InkWell-something result'.

Edit: I want to have a splash effect on my Card widgets when I longpress them. An example of the splash effect that I mean is given in the following GIF:

enter image description here

1 Answers

Use this

return Card(
    child: InkWell(
  onTap: () {},
  onLongPress: () {}
  child: Container(),
));
Related