webviewx_plus は、Android および iOS で webview_flutter を活用し、Web 統合には HTML インラインフレームを使用するクロスプラットフォームの WebView パッケージです。モバイルおよび Web プラットフォーム間で Web コンテンツを埋め込むための一貫した API を提供します。プラットフォーム固有のコードなしにシームレスな Web コンテンツレンダリングを求める開発者向けに設計されており、Flutter アプリにおける Web ベースの機能の実装を簡素化します。このパッケージでは、基本的なナビゲーション、JavaScript 通信、および安全な Web URL の読み込みがサポートされています。
1. Create a WebViewXController inside your stateful widget
lateWebViewXController webviewController;
2. Add the WebViewX widget inside the build method, and set the onWebViewCreated callback in order to retrieve the controller when the webview is initialized
If you need to add other widgets on top of the webview (e.g. inside a Stack widget), you MUST wrap those widgets with a WebViewAware widget.
This does nothing on mobile, but on web it allows widgets on top to intercept gestures. Otherwise, those widgets may not be clickable and/or the iframe will behave weird (unexpected refresh/reload - this is a well known issue).
Also, if you add widgets on top of the webview, wrap them and then you notice that the iframe still reloads unexpectedly, you should check if there are other widgets that sit on top without being noticed, or try to wrap InkWell, GestureRecognizer or Button widgets to see which one causes the problem.
3. Interact with the controller (run the example app to check out some use cases)
Any help from the open-source community is always welcome and needed:
Found an issue?
Please fill a bug report with details.
Wish a feature?
Open a feature request with use cases.
Are you using and liking the project?
Promote the project: create an article, do a post or make a donation.
Are you a developer?
Fix a bug and send a pull request.
Implement a new feature.
Have you already helped in any way?
Many thanks from me, the contributors and everybody that uses this project!
Support & Development Services
This plugin is maintained by Cross Sonic, a software solutions company specializing in Flutter, .NET, AI, and cloud-based applications.
Need Custom Development?
If you need custom development, feature enhancements, or professional support, Cross Sonic provides dedicated development services tailored to your needs. Reach out to us at contact@crosssonic.com.