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.