How to have Circle ripple effect on an IconButton? How to have Circle ripple effect on an IconButton? flutter flutter

How to have Circle ripple effect on an IconButton?


I see that you'd like granular controll over the size of the ripple.I ended up using the code below.

Padding(    padding: EdgeInsets.all(8.0),    child: InkWell(        customBorder: new CircleBorder(),        onTap: () {},        splashColor: Colors.red,        child: new Icon(            Icons.arrow_back,            size: 24,            color: Colors.black,        ),    ),)

The InkWell effect renders a square, however using CircleBorder crops it to a circular shape.

By default the effect attempts to fill the space, so to modify the size I added padding on all sides, cropping the effect. If you are still having trouble with the ripple effect not rendering at all, wrapping your code in a Material() should fix most issues, or taking a look at the app theme.


Wrap your InkWell widget with Material widget and material widget should have a color.

 Material( color: Colors.transparent, child: InkWell( onTap: () { print("tapped"); }, ) );


It worked for me , All above solution made a square shadow not circle

 Material(              color: Colors.transparent,                shape: CircleBorder(),                clipBehavior: Clip.hardEdge,        child : Icon() )