Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jnschulze/flutter-webview-windows
A WebView2-powered Flutter WebView implementation for the Windows platform.
https://github.com/jnschulze/flutter-webview-windows
chromium edge flutter microsoftedge webview webview2 windows
Last synced: 4 days ago
JSON representation
A WebView2-powered Flutter WebView implementation for the Windows platform.
- Host: GitHub
- URL: https://github.com/jnschulze/flutter-webview-windows
- Owner: jnschulze
- License: bsd-3-clause
- Created: 2021-04-30T13:21:38.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-07T11:12:30.000Z (3 months ago)
- Last Synced: 2025-01-11T11:04:52.812Z (11 days ago)
- Topics: chromium, edge, flutter, microsoftedge, webview, webview2, windows
- Language: C++
- Homepage:
- Size: 199 KB
- Stars: 212
- Watchers: 5
- Forks: 119
- Open Issues: 99
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# webview_windows
[![CI](https://github.com/jnschulze/flutter-webview-windows/actions/workflows/ci.yml/badge.svg)](https://github.com/jnschulze/flutter-webview-windows/actions/workflows/ci.yml)
[![Pub](https://img.shields.io/pub/v/webview_windows.svg)](https://pub.dartlang.org/packages/webview_windows)A [Flutter](https://flutter.dev/) WebView plugin for Windows built on [Microsoft Edge WebView2](https://docs.microsoft.com/en-us/microsoft-edge/webview2/).
### Target platform requirements
- [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)
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](https://developer.microsoft.com/en-us/microsoft-edge/webview2/).
- 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/116823636-d8b9fe00-ab85-11eb-9f91-b7bc819615ed.png)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](https://docs.microsoft.com/en-us/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