You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android needs to be able to pause or kill a Flutter app based on memory pressure, then restore the app using a state bundle. Flutter apps needs to support this.
What kind of support are you looking for? You'd like to be able to save state to a bundle and then get that state back when restored? We've been thinking about using the PageStorage mechanism for this use case. If PageStorage persisted across Android killing and restoring the app, would that meet your needs?
My particular interest is that Android be able to kill the Dart VM to relieve memory pressure. This appears to need the Dart app being able to participate in the lifecycle so it can manage resource, which in turn requires some form of persistence. The persistence mechanism itself should probably be a separate issue.
This bug is not an immediate need, more of a tracking bug as the project moves forward.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
abarth commentedon Apr 21, 2016
What kind of support are you looking for? You'd like to be able to save state to a bundle and then get that state back when restored? We've been thinking about using the
PageStoragemechanism for this use case. IfPageStoragepersisted across Android killing and restoring the app, would that meet your needs?jimbeveridge commentedon Apr 22, 2016
My particular interest is that Android be able to kill the Dart VM to relieve memory pressure. This appears to need the Dart app being able to participate in the lifecycle so it can manage resource, which in turn requires some form of persistence. The persistence mechanism itself should probably be a separate issue.
This bug is not an immediate need, more of a tracking bug as the project moves forward.
abarth commentedon Apr 22, 2016
Android is able to kill the Dart VM just by killing the process that contains the Dart VM. There's nothing particular we need to do to enable that.
The part we're missing is persisting enough state so that when Android restarts the app it comes back in a reasonable state.
Hixie commentedon Oct 3, 2017
Closed as dupe of #6827. We do expose the lifecycle state now, we just don't automatically preserve state.
github-actions commentedon Aug 17, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.