fryette / webview_cookie_manager

MIT License
48 stars 52 forks source link

Can't store the cookies #62

Open Riyaz7364 opened 2 years ago

Riyaz7364 commented 2 years ago

`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

rekire commented 1 year ago

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

BijeshNair commented 1 year ago

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