flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

Are custom options supposed to be used also in common operations?

Open manuel-plavsic opened this issue 2 years ago • 1 comments

From the documentation it is a bit unclear if setting up flutter_secure_storage with custom options for a platform, e.g.,

FlutterSecureStorage(
    aOptions: AndroidOptions(
      resetOnError:true,
      encryptedSharedPreferences: true,
    ),
  ),

requires us to provide the same preferences also when reading/writing data? E.g.,

read(key: 'something', aOptions: AndroidOptions(resetOnError:true, encryptedSharedPreferences: true));

Or is it enough to read a key without providing those same custom options? E.g.,

read(key: 'something');

manuel-plavsic avatar May 21 '22 17:05 manuel-plavsic

I would guess it's enough to provide it in the constructor. Providing in read would simply override the constructor

simplenotezy avatar Jul 02 '22 11:07 simplenotezy