Controller data is lost when click in back button in child page
Hello,
In Modular 3.0 when I click in button to navigate to new page it load de vehicles data, but when I click in back button on child page, and click to return to child page again controller data is not load on child page:
onPressed: () async {
await controller
.getVehicles(appController.currentUser.id);
Modular.to.pushNamed("/start/subscriptions/new");
},
Does anybody know how to solve this?
Regards,
@JacquesMarques
Try it Modular.to.pushNamed('/start/subscriptions/new', forRoot: true);
Did u tried to use Singleton? Or u are using ModularState?
I will assume that the @rickafds solution resolved