Ad

Will Shared_preferences Not Persist After The App Is Killed? (flutter)

- 1 answer

I noticed this text in the shared_preferences documentation:

"Data may be persisted to disk asynchronously, and there is no guarantee that writes will be persisted to disk after returning, so this plugin must not be used for storing critical data."

Does that mean the local data stored by shared_preferences will be deleted when the user kills the app?

I'm wanting to keep the user logged in after logging into the app even if the user kills the app and reopens it later.

Ad

Answer

Normally the data will not be removed by the system. But users can delete the data from settings. So, you may grant it as a warning.

Ad
source: stackoverflow.com
Ad