I’m working to host the Flutter Web app on GitHub, following below link:
How to Host your Flutter Web app on GitHub Pages
That is working successfully for me. But now need to Hosting Web Page with WebView
such as :
return WebView(
initialUrl: 'https://my-proj.io/pagename',
),
instead use _loadHtmlFromAssets
2
Answers
You can use webviewx package to render a webview in android|ios|web.
Example:
You can also interact with the controller.
If you are looking to load from your assets directory, I’d recommend using the webview_flutter package:
PS: Don’t forget to add your HTML file to your assets in
pubspec.yaml
(I nested mine under/assets/data
in the example: