Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Flutter how to change popup menu item highlight color radius

I created a popup menu button in Flutter and changed the corner radius of the menu. Now when I touch one of the buttons, the corners of the highlight color remain outside. Is there any way I can change this color or change its radius?

The situation I mentioned is as in the picture.
enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can use RoundedRectangleBorder as its shape and set the clipBehavior to either Clip.antiAlias or Clip.hardEdge.

PopupMenuButton(
  shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
  clipBehavior: Clip.antiAlias, // or Clip.hardEdge
  // ...
)

Screenshot

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading