webview_cookie_manager icon indicating copy to clipboard operation
webview_cookie_manager copied to clipboard

Can't store the cookies

Open Riyaz7364 opened this issue 2 years ago • 2 comments

`package:flutter_inappwebview/src/types.dart

The element type 'Cookie (where Cookie is defined in C:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\lib\src\types.dart)' can't be assigned to the list type 'Cookie (where Cookie is defined in C:\Flutter\flutter\bin\cache\pkg\sky_engine\lib_http\http.dart)'.dartlist_element_type_not_assignable types.dart(3494, 7): Cookie is defined in C:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\lib\src\types.dart http.dart(857, 16): Cookie is defined in C:\Flutter\flutter\bin\cache\pkg\sky_engine\lib_http\http.dart`

I want to store cookies in Cookie list for later use

Riyaz7364 avatar Oct 09 '22 11:10 Riyaz7364

You need to convert the cookies from the http/dart.io package yourself to the format of this library.

rekire avatar Dec 18 '22 20:12 rekire

Cookie is defined in flutter_inappwebview plugin and in http.dart. So you can do import 'dart:io' as httpCookie; and use http's Cookie by httpCookie.Cookie

BijeshNair avatar Feb 06 '23 20:02 BijeshNair