How can I refresh several pages after a database update?
Structure:
Main Page (loads a Model from a local SQLite Database and builds List), click on List item leads to:
-> Detail Page consists of a tab bar
-> Tab Bar Page 1 has some subpages
-> I can change data from the model (like name, age, etc.) in the subpages.
My question is: How can I force to reload all pages up to the Main Page after returning from a subpage to the "Tab Bar Page 1"?
Using an async "onTab"-Button it with the return of the model on the second page (Navigagtion.of(context).pop(newModel)) only refreshes items on the "Tab Bar Page 1" level.
CodePudding user response:
Just add listeners to your database. Whenever something changes, the pages will update automatically