webview_flutter_windows
1.3.1, released 3 weeks ago by tomars.tech
A WebView2-powered webview plugin for Flutter on Windows.
What it does
Renders Microsoft Edge WebView2 off-screen as a Flutter texture, allowing seamless integration into the widget tree with keyboard focus handling, JavaScript bridging, cookie management, and a typed event API.
AI-written summary of version 1.3.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to embed a web browser or web content inside a Flutter desktop application for Windows.
- You require robust keyboard focus management between Flutter text fields and the embedded webview.
- You need a two-way JavaScript bridge or headless web automation on Windows.
Skip it when
- You are building for platforms other than Windows.
- The user's environment lacks the WebView2 Runtime and cannot have it installed.
Strengths
- Seamless texture composition avoiding native airspace issues.
- Robust two-way JavaScript bridge and rich broadcast event streams.
- Built-in keyboard focus management and high-DPI awareness.
Weaknesses
- Restricted solely to Windows.
- Requires the underlying Microsoft Edge WebView2 Runtime to be installed on the user's machine.
- Requires manual native setup with Visual Studio C++ build tools for development.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Requires Visual Studio 2022 with the Desktop development with C++ workload on your development machine, and the WebView2 Runtime on users' machines.
final _controller = WebviewController();
Future<void> _initWebview() async {
await _controller.initialize();
await _controller.loadUrl('https://flutter.dev');
}
@override
Widget build(BuildContext context) {
return _controller.value.isInitialized
? Webview(_controller)
: const Center(child: CircularProgressIndicator());
}Alternatives
Packages that do the same job and could replace webview_flutter_windows.
- webview_windows
A WebView2-powered webview implementation for the Windows platform.
50Compare - webview_flutter_android
Android implementation of the webview_flutter plugin providing a WebView widget.
84Compare - desktop_webview_window
Show a native webview window on your Flutter desktop application.
94Compare - webview_all
A cross-platform WebView plugin for Android, iOS, macOS, Windows, Linux, Web, and OpenHarmony.
87Compare
Works with
Packages commonly used together with webview_flutter_windows: ones it builds on, ones built on it, and its own family.