fluttercommunity / fluttercommunity/flutter_webview_plugin

JavascriptChannel on iOS

Aperta
#712 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
1.5k
Fork
938
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I use JavascriptChannel to pass a string back to the app form webview.
It works perfectly for Android but can't make it work on iOS? Is there anything specific I need to do to make it work?

```
class WebViewJavascriptChannel {
static Set getChannel(Function(String) handler) {
return [
JavascriptChannel(
name: 'JavascriptChannel',
onMessageReceived: (JavascriptMessage javascriptMessage) {
handler(javascriptMessage.message);
print(javascriptMessage.message);
}),
].toSet();
}
}

Widget _getBankIDWebView(String url) {
return WebviewScaffold(
javascriptChannels:
WebViewJavascriptChannel.getChannel(_updateString),
url: url,
withZoom: false,
hidden: true,
appBar: _getAppBar(),
);
}

```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with WebviewScaffold and the javascriptChannels configuration shown in the issue, then reproduce the message flow on iOS and compare it with Android. Done means the issue documents a confirmed iOS-specific requirement or a reproducible failure with a scoped fix and verification steps.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
flutter
Ambito
mobile
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.