I've made store page with Flutter, and Product card must have two click events.
- just click card
- click
add to cart
button
However, I used Stacked InkWell because Product card has image, and I wanted to apply ripple effect on it. And with Stacked InkWell, I can't trigger click event of inside button.
Stack(
children: [
Container(
color: Colors.grey,
child: Column(
children: [
ElevatedButton(
onPressed: () => print('not working TT'), // <- how can I trigger this?
child: const Text('click me!'),
),
],
),
),
Positioned.fill(
child: Material(
color: Colors.transparent,
child: InkWell(
onTap: () => print('nicely working'),
),
),
),
],
)
https://dartpad.dev/ca48be3e4b867c800be6e364d1de95e8
I just want to make this working with ripple effect on the image.