I have a flutter app
I am trying to use https://pub.dev/packages/webview_flutter to show this website:https://pagoumbria.regione.umbria.it/pagoumbria/
but I always receive the error net::ERR_CONNECTION_TIMED_OUT
on the browser the website is fully reachable, so I don't understand the problem
this is the webview controller:
late final WebViewController webViewController = WebViewController() ..setJavaScriptMode(JavaScriptMode.unrestricted) ..setNavigationDelegate( NavigationDelegate( onProgress: (int progress) { if (progress == 100) { print("webView progress $progress% - done"); isLoading.value = false; } else { print("webView progress $progress%"); isLoading.value = true; } }, onPageStarted: (String url) { print("onPageStarted: $url"); isLoading.value = true; }, onHttpError: (HttpResponseError httpError) { if (isWebViewShown.isTrue) { print("onHttpError: ${httpError}"); } }, onWebResourceError: (WebResourceError webResourceError) { if (isWebViewShown.isTrue) { print("onWebResourceError: ${webResourceError.description}"); } }, onNavigationRequest: (request) { print("onNavigationRequest: ${request.url}"); return NavigationDecision.navigate; }, onUrlChange: (change) { print("onUrlChange: ${change.url}"); }, ), );
this is the init:
@override void onInit() async { super.onInit(); try { webViewController.loadRequest( Uri.parse("https://pagoumbria.regione.umbria.it/pagoumbria/")); } catch (e) { error.value = 'Errore durante il caricamento della pagina di pagamento'; } }