flutter_secure_storage
flutter_secure_storage copied to clipboard
Flutter Secure Storage Issues: Unable to read or write keys and values
This may be a stupid question, but I’m not familiar with this so I asked it in Stack Overflow. https://stackoverflow.com/questions/70014273/flutter-secure-storage-issues-unable-to-read-or-write-keys-and-values Does anyone know how to solve this problem?
Did the answer on stackoverflow fix your problem?
No, that answer belongs to the class structure, for now I used back version 4.2.1, that package is working on my Android device.
Do you have any logfiles of the error, or an explanation on why it's unable to read or write keys and values?
I am facing the same problem.
I think the reason for reading / writing problem can be inconsistency with using aOptions
or iOptions
.
For ex. you are using aOptions
with readAll()
, deleateAll()
and write()
methods and you don't use it with read()
, delete()
.
So, when using encryptedSharedPreferences: true,
in aOptions
when you write data to secure storage, you specify that this data must be written to EncryptedSharedPreferences
. However when you read the data without providing aOptions again, you try to read from default secure storage which is not the EncryptedSharedPreferences where you have stored the data.