I am a beginner level Flutter developer trying to resolve the issue with the Navigation stack. In the existing app:
- When user logs in to the app, login api call is shooted
- Homescreen is rendered with Navigator.popUntill method
- All the APIs in the providers get shooted and the respective tabs/screens get filled with api data.
Now, I want to include Onboarding screens before Homescreen, so I made below changes:
- Navigator.push method used to include Onboarding screens.
- After onboarding screens are over, user clicks on "To app" button
- On click of "To app" button, the login call is made again
- User is redirected to Homescreen with Navigator.popUntill method.
But now the data from providers is lost as the respective screens do not show any data. I am pretty sure that something is going wrong with the Navigation stack when I use Navigator.push method to add Onboarding screens but I do not have much expertise in Flutter to debug the issue. Need help with restoring the provider data when navigating to Onboarding screens.