Skip to content
Advertisement

Tag: flutter

How to get javascript console.log in flutter webview

I created a simple javascript that sends a response through console.log(); and I have a flutter WebView that loads the URL and in my flutter android studio console I get this response as I/chromium(27778): [INFO:CONSOLE(20)] “My name”, source: https://response_test.php but I’m looking for a way to receive this response in my flutter app so I can use the response to

Null check operator used on a null value in WebView flutter

please a error when I try to reload my webview from a button : E/flutter (18150): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: Null check operator used on a null value this is my WebView Answer enter code hereUse the fallback operator to set a default value for null values before using the variable. Here, “str” is null, and we set the fallback operator

Redirect only on Flutter Web

I’m trying to set up an app that uses a WebView (flutter_webview on pub) on Android and redirects directly on web, as flutter_webview does not work on web. I looked into js on pub and dart:js but that does not work, as Android doesn’t allow dart:js or package:js to be imported at all. Any ideas? I’m using kIsWeb to detect

Advertisement