Issue with navigation

I'm having page Nav issues .
In my view model I have await PageService.PushAsync(new NavigationPage(new AccountDetailsPage()));

PageService is an Interface for testing which ends up being this:
public async Task PushAsync(Page page)
{
await Application.Current.MainPage.Navigation.PushAsync(page);
}

I am getting this error is: PushAsync is not supported globally on Android, please use a NavigationPage.

This only works when I change it to PushModalAsync. Any Advice

Tagged:

Answers

  • nnovalbosnnovalbos Member ✭✭

    I think is not allowed put navigation page inside another navigation page.

    When you use PushModalAsync, you create another stack of views and this is allowed

Sign In or Register to comment.