fluttercommunity / flutter_webview_plugin

Community WebView Plugin - Allows Flutter to communicate with a native WebView.

Home Page:https://pub.dev/packages/flutter_webview_plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The iOS and Android execution returns are inconsistent

BrinedFish0222 opened this issue · comments

flutter version: 3.7.7
flutter_webview_plugin version: 0.4.0

my code:

final flutterWebviewPlugin = FlutterWebviewPlugin();
var js = "var jsonRes = {\"abc\": 1, \"array1\": [1, 2, 3]};jsonRes";
await flutterWebviewPlugin.launch("about:blank", withJavascript: true, hidden: true);
String? javascriptResult = await flutterWebviewPlugin.evalJavascript(js) ?? '';

Android returned the correct result
iOS result:{
abc = 1;
array1 = (
1,
2,
3
);
}

What's going on here? Can you help me, please