fluttersharedpreferences

Is it possible to access android shared preference to a flutter app?


I am updating my current android app to flutter. Is it possible to access the sharedPreferences used in android app using the shared_preferences plugin on flutter.

So, when the user updates the app, they are logged in directly.


Solution

  • You can use this package native_shared_preferences, there are some method which can help you like (containsKey(), getKeys()).

    this package native_shared_preferences storing without adding prefix to the keys. Unlike this package shared_preferences, where it always add a prefix to each variable stored using it

    prefix: "flutter_"