Enabling WebView Cookies in Flutter

38 views Asked by At

I'm trying to enable the cookies for a paystack payment gateway i'm implementing in my flutter application using the WebView_flutter package. Upon implementing the necessary code for the WebView_flutter and hot reloading the application, a Cookies are not authorized message appeared in the console. Below is the entire console log.

Performing hot reload...
Syncing files to device sdk gphone64 x86 64...
I/flutter ( 4534): true, this is an android device
Reloaded 10 of 1733 libraries in 1,594ms (compile: 874 ms, reload: 434 ms, reassemble: 221 ms).
D/EGL_emulation( 4534): app_time_stats: avg=2985775.25ms min=35.04ms max=5971515.50ms count=2
I/flutter ( 4534): WebView is loading (progress: 10
I/flutter ( 4534): WebView is loading (progress: 10
I/flutter ( 4534): WebView is loading (progress: 20
I/flutter ( 4534): WebView is loading (progress: 20
I/flutter ( 4534): WebView is loading (progress: 80
I/flutter ( 4534): WebView is loading (progress: 80
I/chromium( 4534): [INFO:CONSOLE(1)] "Cookies are not authorized, we will not send any data.", source: https://checkout.paystack.com/js/chunk-vendors.441a57fb.js (1)
I/flutter ( 4534): WebView is loading (progress: 80
I/chromium( 4534): [INFO:CONSOLE(1)] "Cookies are not authorized, we will not send any data.", source: https://checkout.paystack.com/js/chunk-vendors.441a57fb.js (1)
I/flutter ( 4534): WebView is loading (progress: 80
I/chromium( 4534): [INFO:CONSOLE(1)] "Error: Request failed with status code 400", source: https://checkout.paystack.com/js/rollbar.b8db5873.js (1)
I/flutter ( 4534): WebView is loading (progress: 100
I/flutter ( 4534): WebView is loading (progress: 100
I/flutter ( 4534): WebView is loading (progress: 100
I/flutter ( 4534): WebView is loading (progress: 100

I came across solution here on stackoverflow, that says the WebViewCookie widget can be used to resolve that issue. But I don't know how to use it. So I was hoping someone could walk me through its use or implementation.

0

There are 0 answers