I am currently using flutter_webview plugin for a project. In one of the page, I need to get the user location information to calculate the distance. There is JavaScript running on the webpage to get the location.
Here is my sample code.
WebView(
key: _key,
initialUrl: "https://www.w3schools.com/html/html5_geolocation.asp",
javascriptMode: JavascriptMode.unrestricted,
onPageFinished: (_) {
setState(() {
_isLoading = false;
});
},
),
If I open the same page on chrome, it asks for the location permission. I wanted to implement something like that.
I tried using permissions on AndroidManifest file but could not make it work.