I'm trying to send url parameters to local html file in flutters webview, I was able to successfully read the parameters while using the chrome browser but cannot do it through webview. In the html file I'm using 'windows.location.search' to read urlParams.
_loadHtmlFromAssets() async {
//attach parameters to filePathurl
filePath = "assets/htmls/extreme_windspeed.html";
String fileHtmlContents = await rootBundle.loadString(filePath);
_webViewController.loadUrl(Uri.dataFromString(fileHtmlContents,
parameters: {"p": "RAINFALL"}, //I want to read this parameter
mimeType: 'text/html',
encoding: Encoding.getByName('utf-8'))
.toString());
}
If this is not a viable solution I would settle for anyother solution. Thanks!