Hide the selected DropdownItem's text in the DropdownButton and only display the icon

20 Views Asked by At

Pic 1 Pic 2

I have created a DropdownButton with two DropdownItems (share and edit). Whenever I select a DropdownItem (for example edit as you can see in pic 2), the selected item's value gets displayed (pic 2). I don't this to happen. I just want to display the icon (in my case the info icon) even when a DropdownItem is selected).

I tried various things like setting isDense to true or wrapping the DropdownButton with a SizedBox and setting some width but nothing worked.

1

There are 1 best solutions below

0
Smashell On BEST ANSWER

I just used a popupmenubutton.