webviewx_plus
0.5.1+1, released 2 years ago by crosssonic.com
Cross‑platform webview widget using webview_flutter for mobile and iframe for web with JS interop
What it does
Provides a WebViewX widget and controller that can load URLs, HTML or bypassed URLs. It supports JavaScript execution, media playback policies, and allows Dart callbacks from JavaScript.
AI-written summary of version 0.5.1+1, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need to display web content inside a Flutter app on mobile or web
- Require JavaScript interop between Dart and the loaded page
- Want a simple, declarative API without writing native platform code
Skip it when
- Building a highly custom native webview with advanced features like custom rendering or native plugins
- Using the widget in a pure web‑only project where iframe is not suitable
Strengths
- Cross‑platform support (Android, iOS, Web)
- Built‑in JS interop via EmbeddedJsContent and DartCallback
- Easy controller API for navigation and content loading
- No build_runner or code generation required
Weaknesses
- Relies on webview_flutter which may have platform limitations
- Iframe on web can have gesture and reload quirks
- Limited to the features exposed by webview_flutter and iframe
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 9
WebViewX(
initialContent: '<h2>Hello, world!</h2>',
initialSourceType: SourceType.HTML,
onWebViewCreated: (controller) => webviewController = controller,
);Alternatives
Packages that do the same job and could replace webviewx_plus.
- flutter_widget_from_html
Render HTML content as native Flutter widgets with support for common tags, CSS, and media.
89Compare - flutter_md
Fast Markdown parser and canvas renderer for Flutter with text selection and streaming.
82Compare - sliver_dashboard
Smooth, sliver-based drag and resize grid engine for Flutter dashboards.
76Compare - divkit
Open source Server-Driven UI (SDUI) framework for cross-platform layouts from JSON
62Compare
Works with
Packages commonly used together with webviewx_plus: ones it builds on, ones built on it, and its own family.
- uuidwebviewx_plus depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- webwebviewx_plus depends on itLightweight bindings for browser APIs via JS interop
- webview_flutter_wkwebviewwebviewx_plus depends on itA Flutter plugin providing a WebView widget based on Apple's WKWebView control.
- webview_flutter_androidwebviewx_plus depends on itAndroid implementation of the webview_flutter plugin providing a WebView widget.
- webview_flutterwebviewx_plus depends on itFlutter plugin that embeds a native WebView widget.
- pointer_interceptorwebviewx_plus depends on itA widget to prevent clicks from being swallowed by underlying HtmlElementViews on the web.