Friday, November 6, 2026
HomeiOS Developmentandroid - Unable to click on on shut button on webview for...

android – Unable to click on on shut button on webview for iOS gadgets higher than 8

[ad_1]

I am new to flutter and am creating an utility which makes use of a webview. Within the webview it comprises shut button (‘X’) and some extra parts. So if i click on on ‘X’ button the webview ought to shut. After I run the appliance on android and iOS(8<=) gadgets every little thing appears to work high quality. However once I run the appliance on iOS gadgets higher than 8, the webview shut button does not appear to work. I am at the moment utilizing the default webview class and have already tried ‘InAppWebView’ and ‘WebviewScaffold’. ‘WebviewScaffold’ solves the problem but it surely hides the opposite parts like popupmenu and alert field. Additionally i attempted logging the webview’s exercise and it does not assist both. I am unsure what else I can do right here? Or am I lacking one thing right here? Here is the code if it is of any assist:-

class Part extends StatefulWidget {
  closing String? userId;
  closing String? url;

  Part({Key? key, this.userId, this.url}) : tremendous(key: key);

  @override
  WebViewContainerState createState() => WebViewContainerState(userId, url);
}

class WebViewContainerState extends State<Part> {

  WebViewController? _webViewController;
  closing String? userId;
  closing String? url;

  WebViewContainerState(this.userId, this.url);

  @override
  Widget construct(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      house: Scaffold(
        resizeToAvoidBottomInset: false,
        physique: WebView(
            initialUrl: url,
        javascriptMode: JavascriptMode.unrestricted,
        gestureNavigationEnabled: true,
        onWebViewCreated: (controller){
            _webViewController = controller;
            },
        ),
      ),
    );
  }

  void refreshing() {
    _webViewController?.reload();
  }

  goBack(){
    _webViewController?.goBack();
  }

  canGoBack(){
    return _webViewController?.canGoBack();
  }

}

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments