How to define MODE of Shared_Preferences in Flutter

634 views Asked by At

In Android, we are defining Shared Preferences Mode like

getSharedPreferences(String name, int mode)

MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE

How we can define MODE in shared_preferences flutter?

1

There are 1 answers

0
Md Shahnawaz On BEST ANSWER

SharedPreferences uses MODE_PRIVATE and by now we don't have the option to change this.

The other options are now deprecated and it is not recommended to use then. See https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE.