Persist data even after clearing app's cache and storage using Flutter Secure Storage

548 views Asked by At

I am using Flutter Secure Storage for storing data locally in my Flutter app. I need some of my data to persist even after the user clears app's cache and storage or uninstalls the app.

How do I do it?

2

There are 2 answers

1
Harsh Sureja On

Seems like your data auto backup by android side. You can learn more from here

Add this into manifest file.

<manifest ... >
    ...
    <application android:allowBackup="false" ... >
        ...
    </application>
</manifest>
0
AJJ On

If you are using secure storage then no need to worry about data you lost after uninstall the app. It will give you functionality regarding store persistent data in your local. So, even if you uninstall the app you store your data locally in your app. But your data will be stored in encrypted form it will be not in human readable form.

For more information you can follow there official package flutter_secure_storage or thi blog for your reference.