I use this plugin in my fluttter app - webview_flutter. I need show local html file in webview. This is not from assets, but I have path to this file. I try it:
Read file as string
var file = File(_path); var data = await file.readAsString();prepare string
String _getHtml() { var html = Uri.dataFromString(data, mimeType: 'text/html').toString(); return html; }Show this string in my webview
WebView( initialUrl: _getHtml(), )
But I have get error(on step Uri.dataFromString) :
How fix it? Any tips?