In Fluter, I have some pages with an AppBar
that shows the menu icon of the navigation drawer that it is used to navigate among distinct pages. Some of this pages allow the user to edit some data. So, I would like to ask for confirmation when the user clicks the menu icon without saving the editions she has made, but I have not found a way to override the (equivalent to the) onTap
for the navigation menu icon.
There are solutions when a bottom navigation bar is used, and solutions that detect when the page has been popped, but I need the confirmation dialogue to be shown on the page being closed before the closing takes place.