Search packages, repositories and app categories

webview_windows cover
Package detailsv0.4.0

webview_windows

A WebView2-powered webview implementation for the Windows platform.

Windows
30-day downloads
77K
Likes
236
Pub points
140

Install package

flutter pub add webview_windows

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that provides a WebView2-powered web view implementation for Windows, enabling seamless integration of web content within desktop applications. Built specifically for the Windows platform, it leverages Microsoft's WebView2 control, which is based on Chromium, ensuring modern web compatibility and performance. The package allows developers to display web pages, handle navigation, and interact with JavaScript from Dart. It supports common web view features like URL loading, navigation events, and basic scripting. Ideal for embedding web-based UIs or content in Windows desktop apps built with Flutter.

Use cases

  • Embedding web content in Windows desktop apps
  • Displaying dynamic web-based interfaces
  • Integrating web services into desktop applications
  • Building hybrid desktop applications with web components
  • Creating rich user experiences with embedded web views

Key features

  • WebView2-powered rendering on Windows
  • Chromium-based web engine
  • JavaScript interaction support
  • Navigation event handling
  • Cross-platform compatible with Flutter desktop

Suitable for

  • Flutter developers targeting Windows desktop
  • Apps requiring embedded web content
  • Hybrid desktop applications with web components
  • Developers needing modern web rendering on Windows
  • Projects using WebView2 for Windows-specific functionality

Considerations

  • Windows-only platform support
  • Requires WebView2 runtime installation
  • Limited to Windows desktop environment
  • May require additional setup for production deployment
  • Dependent on WebView2 control availability on target systems

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

webview_windows

CI Pub

A Flutter WebView plugin for Windows built on Microsoft Edge WebView2.

Target platform requirements
  • WebView2 Runtime
    Before initializing the webview, call getWebViewVersion() to check whether the required WebView2 Runtime is installed or not on the current system. If getWebViewVersion() returns null, guide your user to install WebView2 Runtime from this page.
  • Windows 10 1809+
Development platform requirements
  • Visual Studio 2019 or higher
  • Windows 11 SDK (10.0.22000.194 or higher)
  • (recommended) nuget.exe in your $PATH (The makefile attempts to download nuget if it's not installed, however, this fallback might not work in China)

Demo

image

https://user-images.githubusercontent.com/720469/116716747-66f08180-a9d8-11eb-86ca-63ad5c24f07b.mp4

Limitations

This plugin provides seamless composition of web-based contents with other Flutter widgets by rendering off-screen.

Unfortunately, Microsoft Edge WebView2 doesn't currently have an explicit API for offscreen rendering. In order to still be able to obtain a pixel buffer upon rendering a new frame, this plugin currently relies on the Windows.Graphics.Capture API provided by Windows 10. The downside is that older Windows versions aren't currently supported.

Older Windows versions might still be targeted by using BitBlt for the time being.

See:

  • https://github.com/MicrosoftEdge/WebView2Feedback/issues/20
  • https://github.com/MicrosoftEdge/WebView2Feedback/issues/526
  • https://github.com/MicrosoftEdge/WebView2Feedback/issues/547

Categories

Source repository

Projects using this package