gpt4 book ai didi

save InAppWebView Cookies in Shared_Preferences F;utter(将InAppWebView Cookie保存在Shared_Preferences中(&U))

转载 作者:bug小助手 更新时间:2023-10-24 20:29:22 25 4
gpt4 key购买 nike



I'm using shared_preferences ^2.0.15. I'm facing webview logout problem. Every time user restart the app, user logout from the webview. I'm trying to save cookies when user login in webview and generate cookies.
So I'm troubling to save in cookies in Shared_Preferences.

我正在使用SHARED_PARESSION^2.0.15。我面临着Webview注销问题。每次用户重新启动应用程序时,用户都会从网页视图中注销。当用户登录Webview并生成Cookie时,我正在尝试保存Cookie。因此,在Shared_Preferences中保存Cookie很麻烦。


  final cookies = <dynamic>[].obs;
void saveCookies(dynamic value) async {
final store = await SharedPreferences.getInstance();
store.clear();
cookies.value = value;
await store.setString('cookies', convert.jsonEncode(cookies.toJson())); // Fail to add
}

var cookieList = await _cookieManager.getCookies(url);
saveCookies(cookieList);


更多回答
优秀答案推荐
更多回答

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com