fluttercommunity / flutter_webview_plugin

Community WebView Plugin - Allows Flutter to communicate with a native WebView.
https://pub.dev/packages/flutter_webview_plugin
Other
1.48k stars 930 forks source link

Problem with Cookies #779

Open varunkumarmedam opened 4 years ago

varunkumarmedam commented 4 years ago

It cant able to store cookies, For my application it is necessary to store cookies help me out how to resolve this or else add this feature that helps and that matters a lot

fryette commented 4 years ago

You can use https://pub.dev/packages/webview_cookie_manager

varunkumarmedam commented 4 years ago

If so I need to trigger two HTTP calls one for webview and another for setting up cookies and also I think we cant access flutter code on triggering a particular function in webview. https://pub.dev/packages/flutter_inappwebview this works fine storing cookies automatically but with some glitches :(

fryette commented 4 years ago

@varunkumarmedam why you need two HTTP calls? The library above just use native cookie managers to set cookies. No HTTP calls needed. I use flutter_webivew with webview_cookie_manager and it works great together.

Hongyu-Zhuo commented 4 years ago

can use evalJavascript(),like this:

final flutterWebViewPlugin = FlutterWebviewPlugin();
flutterWebViewPlugin.evalJavascript('document.cookie="cookieName=${cookieValue}"');
varunkumarmedam commented 4 years ago

https://github.com/fluttercommunity/flutter_webview_plugin/issues/779#issuecomment-657418724 we have problem with keyboard and performance in flutter_webview plugin but those things are resolved in this plugin. I wanted to set cookies automatically using this plugin only

varunkumarmedam commented 4 years ago

can use evalJavascript(),like this:

final flutterWebViewPlugin = FlutterWebviewPlugin();
flutterWebViewPlugin.evalJavascript('document.cookie="cookieName=${cookieValue}"');

But we wanted to set cookies automatically not by triggering any functions

shinriyo commented 3 years ago

resolved??

varunkumarmedam commented 3 years ago

This plugin doesnt resolved my issue, Instead I used to set cookies from the same domain and it works 🤟