Is there a way to dismiss multiple modals or only one by one like this: Navigation.ModalPopAsync()
?
For Modals you have to do one by one because its on the Modal Stack
For Navigation Stack you can use Navigation.PopToRootAsync()
Also you can try not await
the Navigation.ModalPopAsync()
and also pass animation as false.
You can find more details in this forum post- PopToRootAsync with Modal
I've actually written something to pop all modals. Give it a shot.
int numModals = Application.Current.MainPage.Navigation.ModalStack.Count;
for (int currModal = 0; currModal < numModals; currModal++)
{
await Application.Current.MainPage.Navigation.PopModalAsync();
}