I've got an app in Flutter that's pulling a lot of data in the parent screen. The parent screen gets divided into a few child screens and those go to a few more child screens.
Now, in order to make sure this isn't pulling data all the time from the API, I'm only pulling it once in the root screen - which is fine 90% of the time.
All the subsequent updates are broadcasted throughout the app via firebase cloud messaging
If I'm on screen 3, I need to update data in screen 1 which should also update data which will eventually be displayed on screen 2. I'm currently using this method to pass my data around (https://flutter.io/cookbook/navigation/passing-data/)
For example, screen 1 contains three projects. Each project has its own screen.
Screen 2.1 is for project 1, screen 2.2 is for project 2 and so on.
In screen 2.1, there are n to do lists.
Now if I open the to do list, I reach screen 3 with the data of the first to do list of project 1.
In a firebase cloud messaging data notification, I receive the new information of this todo list and something from the todo list of project 2 todo list 1.
How do I maintain consistency and update the data across the board?
Do I need to change my architecture and use Redux or something along those lines?