Maybe I am trying to use the wrong component for what I want to do. I have a PopUpMenuButton with 2 items in it. I only want to take action when a user selects an item in the popup menu.
I have set the itemClick event to perform the necessary actions.
The button only displays the menu when the down arrow is clicked, but the itemClick event fires regardless of where the button is clicked. So I am getting the unwanted behavior of action being taken based on the last item selected without a menu being displayed/selected by the user.
How can I distinguish if the event occurred because the user clicked the menu down arrow or the main part of the button?
Should I be approaching this differently?
Thanks,
John
If you look at this example found here, you can see that the label property of the MenuEvent is accessible. As long as the items in the PopUpMenu have different labels, you can use some simple logic to determine which button was clicked like in the example.