i am using xamarin forms and i have a scenario where i have 3 pages(content pages) . In page1 on the click of a button i need to goto page2. and in the the page2 check a flag to decide whether to stay in page2 or redirect to page3. i am trying to do this logic in page 2 constructor and my NavigationStack is coming up as empty. Please suggest.
Page2 constructor:
public Page2()
{
InitializeComponent();
If(check==true)
{
Application.Current.MainPage = new NavigationPage(new Page3());
}
}