How to rebuild the first screen once it is poped back without any data to first screen ? (flutter )

Viewed 18

The use case I have:

  1. bottom navigation bar : Home, add post, cart, explore, profile

from profile page there is a button on press of which it will send to the update profile screen page.

on the press of the update button it will update the data to the database and navigate back the profile page poping the update screen page

but the problem i am facing in here is the old data is persisted in the screen.

if i pushReplace the route, the bottom nav bar is not seen

so how can i rebuild the profile screen by just poping the context ?

0 Answers
Related