Home > other >  Flutter || How to implement Shared Preferences in webview
Flutter || How to implement Shared Preferences in webview

Time:02-18

I have a WebView project in flutter and I want to add my own page of authentication at first when you open the page I don't know if there is a way the user can authenticate from this page with the cache of my WebView.

CodePudding user response:

Your question is not clear that much but I think you want to save the user login details when a user login from a WebView and the user doesn't have to re-login again and again when the user closes the app.

If this is what you want to know then you have to use Shared_preferences

shared_preferences: ^2.0.13

what is shared preferences?

SharedPreferences is used for storing data key-value pairs in Android and iOS. SharedPreferences in flutter uses NSUserDefaultson iOS and SharedPreferences on Android, providing a persistent store for simple data.

  • Related