Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: how can I make a rounded PopupMenuButton's InkWell?

Tags:

flutter

I have a PopupMenuButton inside a FloatingActionButton. But it's InkWell is not rounded, it is standard square shape. How can I achieve that?

like image 885
Daniel Oliveira Avatar asked Dec 10 '18 21:12

Daniel Oliveira


People also ask

How do you get the InkWell circular in flutter?

You can use borderRadius property of InkWell to get a rounded Ink Splash. Save this answer.

How do you make an InkWell circle?

To change the border of our splash to have a border-radius, we can the customBorder property of the InkWell widget. InkWell( customBorder: RoundedRectangleBorder( borderRadius: BorderRadius. circular(10), ), child: YourWidget(), ), The above code will control the flow of Splash to have a radius of 10 at all corners.

How do you add padding to InkWell in flutter?

You should make it the parent. return Padding( padding:EdgeInsets. only(right:20), child:InkWell( // splashColor: Colors. orange, onTap: () { ProductModel.

What is the difference between InkWell and InkResponse widget in flutter?

they both make a splash but InkWell is for rectangular shapes only while InkResponse can be clipped.


1 Answers

Use customBorder property of InkWell:

InkWell(
    customBorder: CircleBorder(),
    onTap: () {}
    child: ...
)
like image 182
Dyvoker Avatar answered Oct 07 '22 19:10

Dyvoker