Skip to content
pubscout

webview_flutter_windows

1.3.1, released 3 weeks ago by tomars.tech

A WebView2-powered webview plugin for Flutter on Windows.

WASM-ready
$ flutter pub add webview_flutter_windows
Source repository

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.

Works with

Packages commonly used together with webview_flutter_windows: ones it builds on, ones built on it, and its own family.