Flutter WebView Location

172

This is unsupported in flutter. Even if you try to ask for location access using permission handler the app will deny it and still if you manually give the location permission to the app from your phone it still won't catch the real time location. Suggestion is to use plain old java for it you can find a lot of help around the internet about webview in java with location access it works perfect.

Share:
172
Arpit Jai
Author by

Arpit Jai

Updated on January 02, 2023

Comments

  • Arpit Jai
    Arpit Jai over 1 year

    I am creating a WebView of this website https://nearxt.com/ which asks for location when opened but when i use this link to create a webview in flutter then it can not take location i have also defined location in the application but webview cant recieve location

     SafeArea(
        child: WebView(
         javascriptMode: JavascriptMode.unrestricted,
          initialUrl: flutterUrl,
          onWebViewCreated: (WebViewController webViewController) {
            _controller = webViewController;
          },
        ),
      ),