Is there a way to save then restore the full state of a Flutter application ?
By full, I mean saving the states of all widgets and objects
For example, a TextField will have the exact text on it, the exact color, highlights,
A GoogleMap will have the exact Zoom states, Markers, Polylines
Every objects internal states will be kept, even private fields.
...
I can't do it manually for three main reasons:
- There are too many states, any wrong state can lead to a butterfly effect of discrepancy
- Some states of some classes are impossible to get and set as they are internal (private)
- Some states are random at instantiation
I figured out the technical term is https://en.wikipedia.org/wiki/Continuation
There is an important use case for that:
User could Save current state of their work then resume later. (More like "Save" in games)