Restore state on iOS
When a user runs a mobile app and then selects another app to run, the first app is moved to the background, or backgrounded. The operating system (both iOS and Android) often kills the backgrounded app to release memory or improve performance for the app running in the foreground.
You can use the RestorationManager
(and related) classes to handle state restoration. An iOS app requires a bit of extra setup in Xcode, but the restoration classes otherwise work the same on both iOS and Android.
For more information, check out State restoration on Android and the VeggieSeasons code sample.
Unless stated otherwise, the documentation on this site reflects the latest stable version of Flutter. Page last updated on 2024-12-12. View source or report an issue.