i want to create a flutter dropdown button like shown in the images below. this is an InkWell at the end of the row widget with text and assetImage. i want when a user clicks on the inkwell it display the options as below:
enter image description here
and after selecting from the options the inkwell will appear like this:
enter image description here
the selected option should appear in red color in the menu list
2
Answers
No need of dropdown use PopupMenuButton for it.
You can use MenuAnchor for this.
https://api.flutter.dev/flutter/material/MenuAnchor-class.html
Make a function that selects what item you clicked on and updates the ui accordingly