Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One way to obscure the ripple effect of Inkwell in Flutter is by adding a child container filled with color on top of the Inkwell. This will block the visibility of the ripple effect.

To do this, you can wrap the Inkwell widget in a Stack widget and then add a child container with the desired color as the first child of the Stack. This way, the Inkwell will be placed on top of the colored container, obscuring the ripple effect.

Here's an example code snippet:

Stack(
  children: [
    Container(
      color: Colors.blue, // or any other color
    ),
    InkWell(
      onTap: () {
        // Handle onTap event
      },
      child: Text('Tap me'),
    ),
  ],
)