I am developing a cross platform application. It has two pages say A and B.
From A I use Navigation.PushAsync to move to page B.
In the Toolbar, at the top of the screen, I have the back button. (Back in case of iOS and Home button as Up in case of android).
On pressing that back button, I need a dialog asking for confirmation, whether the user is sure to go to previous screen.
Only if the user presses ok, the current Page has to be popped.
How can this be done ?
Note : The onBackButtonPressed() method is called in Android, only if the user presses the android back key and not the home in Toolbar.
In iOS, it is not at all called.