A WebView2-powered Flutter WebView implementation for the Windows platform.

Overview

webview_windows

CI Pub

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

Target platform requirements

Development platform requirements

  • Visual Studio 2019
  • Windows 10 SDK 1903+ (10.0.18362.1)

Demo

image

webview_demo1.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:

Issues
  • Not able to load html and js content from assets

    Not able to load html and js content from assets

    First of all,Thanks for the great package. I have issue while loading web content,I have html and js file in assets folder,

    1. though I am able to load html content, Js file is't working using (loadStringContent function),
    2. Also communication between dart and html js is't working and vice versa.

    If the feature is implemented please provide example for each cases, if not I hope this feature will come soon

    opened by CodingWithTashi 13
  • Error: does not contain a CMakeLists.txt file.

    Error: does not contain a CMakeLists.txt file.

    flutter-webview-windows/example/windows/flutter/ephemeral/.plugin_symlinks/webview_windows/windows/third_party/fmt

    does not contain a CMakeLists.txt file.

    opened by kechankrisna 11
  • CMake Error at flutter/ephemeral/.plugin_symlinks/webview_windows/windows/CMakeLists.txt:32

    CMake Error at flutter/ephemeral/.plugin_symlinks/webview_windows/windows/CMakeLists.txt:32

    it happend when i use webview_windows: ^0.1.4

    Building Windows application... CMake Error at flutter/ephemeral/.plugin_symlinks/webview_windows/windows/CMakeLists.txt:32 (message): Integrity check for D:/Android/Projects/publish_player/build/windows/nuget.exe failed

    Exception: Unable to generate build files

    Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.18363.1556], locale zh-CN) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.9) [√] Android Studio (version 2020.3) [√] Connected device (2 available)

    opened by TOKID 10
  • Read HTML from webview

    Read HTML from webview

    Is it possiable read html when page finished ?

    We implement the same function on flutter_webview

    return WebView(
     ...
        onPageFinished: (result) async {
          String html =
          (await _mobileWebViewController!.evaluateJavascript(
              "window.document.getElementsByTagName('html')[0].outerHTML;"));
          //read(html);
        },
     ...
    }
    

    Thanks~

    opened by dodatw 9
  • App Crashes on Windows

    App Crashes on Windows

    webview_windows_plugin.dll make crashes my app only on certain Windows. I insalled webview2 and windows version is more than Windows 10 1809+. Any idea? EDIT: Its seem that depends on build and version of windows. For example on windows 10 home version 21h2 app crashes. In windows 11 or windows 10 (version 10.0.18363 build 18363) doesn't crash.

    opened by matteotoma98 8
  • Null safety error &

    Null safety error & "Not Initialized" on screen.

    Hi there! I've been trying to get this plugin to work but cannot. I'm trying to build example app.

    Exception:

    [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: LateInitializationError: Field '[email protected]' has not been initialized.
    #0      WebviewController._methodChannel (package:webview_windows/webview_windows.dart)
    #1      WebviewController.loadUrl (package:webview_windows/webview_windows.dart:205:11)
    #2      _MyAppState.initPlatformState (package:app/main.dart:39:23)
    

    flutter doctor

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.19042.572], locale en-US)
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        ✗ Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
    [✓] Chrome - develop for the web
    [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.6)
    [✓] Android Studio (version 3.6)
    [✓] VS Code (version 1.56.2)
    [✓] Connected device (3 available)
    

    Further information I'm on latest Windows SDK.

    Thanks a lot. Please help me out. 🙏

    opened by alexmercerind 7
  • execute script not returning string

    execute script not returning string

    Please Make the executeScript method with returing String

    _controller.executeScript('''
                      document.getElementById('MessageDisplay_TABLE').textContent;
      ''').then((vgt) {
    print(vgt);
    });
    
    opened by venky9885 6
  • Browser may not be secure when authenticating via google

    Browser may not be secure when authenticating via google

    Hi! Amazing Package! thankyou!

    Im trying to use this package to implement an oauth flow. After users are redirected to google auth. google informs that the browser may not be secure and does not let the user log in.

    https://user-images.githubusercontent.com/76003859/146657999-86f94b54-6f59-4d9b-95b5-af8bca8df1ee.mp4

    Hopefully the attachment is good enuff to show what i mean.

    P.S. How do i close the webview? _controller.dispose() ?

    opened by AhyaanTech 6
  • Unable to run with the defined setup in readme.

    Unable to run with the defined setup in readme.

    First of all thanks to this huge effort and great pacakage.

    Currently I am unable to run even after following the minimal amount of information in Readme.

    • I have set up the nuget.exe in path and is available.
    • I have installed the webview2 runtime
    • My windows version is 1909

    Still following error is shown without much details. I tried flutter clean and also git init submodule && git update submodule as mentioned in issue #3 .

    C:\Abhilash\Sources\dashboard\dashboard_frontend\windows\flutter\ephemeral\.plugin_symlinks\webview_windows\windows\util/capture.desktop.interop.h(4,10): fatal error C1083: Cannot open include file: 'windows.graphics.capture.interop.h': No such file or directory [C:\Abhilash\Sources\dashboard\dashboard_frontend\build\windows\plugins\webview_windows\webview_windows_plugin.vcxproj]
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\cppwinrt\winrt/base.h(6508,17): error C2220: the following warning is treated as an error [C:\Abhilash\Sources\dashboard\dashboard_frontend\build\windows\plugins\webview_windows\webview_windows_plugin.vcxproj]
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\cppwinrt\winrt/base.h(6508,17): warning C5205: delete of an abstract class 'winrt::impl::implements_delegate<winrt::Windows::UI::Core::DispatchedHandler,H>' that has a non-virtual destructor results in undefined behavior [C:\Abhilash\Sources\dashboard\dashboard_frontend\build\windows\plugins\webview_windows\webview_windows_plugin.vcxproj]
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\cppwinrt\winrt/base.h(6508,17): error C2220: the following warning is treated as an error [C:\Abhilash\Sources\dashboard\dashboard_frontend\build\windows\plugins\webview_windows\webview_windows_plugin.vcxproj]
    C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\cppwinrt\winrt/base.h(6508,17): warning C5205: delete of an abstract class 'winrt::impl::implements_delegate<winrt::Windows::UI::Core::DispatchedHandler,H>' that has a non-virtual destructor results in undefined behavior [C:\Abhilash\Sources\dashboard\dashboard_frontend\build\windows\plugins\webview_windows\webview_windows_plugin.vcxproj]
    C:\Abhilash\Sources\dashboard\dashboard_frontend\windows\flutter\ephemeral\.plugin_symlinks\webview_windows\windows\util/capture.desktop.interop.h(4,10): fatal error C1083: Cannot open include file: 'windows.graphics.capture.interop.h': No such file or directory [C:\Abhilash\Sources\dashboard\dashboard_frontend\build\windows\plugins\webview_windows\webview_windows_plugin.vcxproj]
    C:\Abhilash\Sources\dashboard\dashboard_frontend\windows\flutter\ephemeral\.plugin_symlinks\webview_windows\windows\util/capture.desktop.interop.h(4,10): fatal error C1083: Cannot open include file: 'windows.graphics.capture.interop.h': No such file or directory [C:\Abhilash\Sources\dashboard\dashboard_frontend\build\windows\plugins\webview_windows\webview_windows_plugin.vcxproj]
    
    flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.18363.1441], locale de-DE)
    [√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.6)
    [√] Android Studio (version 4.1.0)
    [√] VS Code (version 1.56.1)
    [√] Connected device (3 available)
    
    • No issues found!
    
    opened by Abhilash-Chandran 6
  • Getting value of inner html from webview into dart (as a string).

    Getting value of inner html from webview into dart (as a string).

    Hello,

    Is there a way in which I can get the value of a text element in the web page (self-hosted) as a dart String?

    So far I have only found executeScript which returns Future thereby making it incapable of doing this. Also, there isn't a Javascript channel like what we have in webview_flutter (for IOS and Android) which could also facilitate this two-way communication. Thanks in advance.

    opened by Ingenious-c0der 5
  • WebView not working correct when using Touchscreen

    WebView not working correct when using Touchscreen

    WebView does not work properly when using a touch screen. When attempting to scroll with a touchscreen, text is marked selected instead of scrolling. Executing a button doesn't work either.

    The issue can be reproduced using the sample app on a touchscreen.

    opened by brownson 5
  • How to integrate Microsoft Edge WebView2 when installing applications for other devices?

    How to integrate Microsoft Edge WebView2 when installing applications for other devices?

    I am having problem when installing flutter application on another machine, webview display error because the machine does not have Microsoft Edge WebView2 installed. How to automatically install Microsoft Edge WebView2 when installing flutter apps

    opened by tuantiensiu 1
  • Webview2 headers not found unless flutter build is run twice

    Webview2 headers not found unless flutter build is run twice

    Thanks for a great package, it's indispensable for Flutter right now.

    I'd like to use the latest version with the runtime AVX detection, however I'm running into the "missing Webview2.h" issue, which resolves when I run the flutter build again. So after a flutter clean, the first flutter build fails, and the next flutter build succeeds.

    Visual Studio 2022 Community 17.2.2 Flutter 3.0.1 webview_windows 0.1.9

    Screen Shot 2022-05-26 at 12 10 27 AM
    opened by emsaints 0
Owner
Niklas Schulze
Niklas Schulze
Enduro/X Middleware Platform for Distributed Transaction Processing

endurox Build (including atmi/ubf tests) status OS Status OS Status OS Status AIX 7.1 Centos 6 FreeBSD 11 Oracle Linux 7 OSX 11.4 raspbian10_arv7l SLE

Mavimax, Ltd 107 Jun 28, 2022
The application framework for developer module of EdgeGallery platform

crane-framework crane-framework将可复用的计算和软件功能抽象成插件,APP开发者面向使用插件进行MEC APP开发。这样屏蔽了和MEC平台交互的细节,实现MCE APP和MEC平台的松耦合。而且插件框架基础能力可裁剪,按需提供最小的APP系统。 特性介绍 为了方便开发者

EdgeGallery 21 Aug 30, 2021
Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows

English | 简体中文 | 繁體中文 Overview Drogon is a C++14/17-based HTTP application framework. Drogon can be used to easily build various types of web applicat

An Tao 7.7k Aug 4, 2022
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

null 6.3k Jul 31, 2022
Ultra-lightweight web browser based on Qt Ultralight webview, powered by Ultralight HTML renderer

Qt Ultralight Browser This is an ultra-lightweight web browser powered by the Ultralight web engine embedded in Qt 5 app as a custom webview widget -

niu tech 34 Jul 24, 2022
A flutter plugin that runs a wayland compositor to stream textures onto flutter, allows creation of wayland based shells using flutter

flcompositor A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package that

Davide Bianco 3 Jan 10, 2022
A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs.

webview for golang and c/c++ A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. The goal of the project is to

polevpn 14 Jul 5, 2022
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Nim bindings, Haskell, C# bindings and Java bindings available.

webview 10.3k Aug 4, 2022
A Zig binding to the webview library. Make Zig applications with a nice HTML5 frontend a reality!

A Zig binding to the webview library. Make Zig applications with a nice HTML5 frontend a reality!

ZigLibs 35 Aug 1, 2022
A simple library that helps Android developers to execute JavaScript code from Android native side easily without using Webview.

AndroidJSModule A simple library that helps Android developers to execute JavaScript code from Android native side easily without using Webview. Insta

Hung Nguyen 5 May 24, 2022
A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.

system_tray A Flutter package that that enables support for system tray menu for desktop flutter apps. on Windows, macOS and Linux. Features: - Modify

AnTler 108 Jul 29, 2022
A flutter package for making game levels map like candy crush or similar games using flutter with ability to be horizontal or vertical

Game Levels Scrolling Map A package for making game levels map like candy crush or similar games using flutter with ability to be horizontal or vertic

Mohamed Sayed 10 Jul 1, 2022
Flutter-Clock-and-Reminder-App - a highly functional clock and reminder app developed on flutter framework.

clock_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Umar Baloch 6 Aug 4, 2022
A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via `dart:ffi`

cronet_flutter A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via dart:ffi

null 20 Jun 15, 2022
Free, cross-platform 2D game engine powered by Haxe and OpenFL

flixel | addons | ui | demos | tools | templates | docs | haxeflixel.com Links Here are the most important links to get you started with HaxeFlixel: G

HaxeFlixel 1.6k Aug 1, 2022
Cutter is a free and open-source reverse engineering platform powered by rizin

Cutter is a free and open-source reverse engineering platform powered by rizin. It aims at being an advanced and customizable reverse engineering platform while keeping the user experience in mind. Cutter is created by reverse engineers for reverse engineers.

Rizin Organization 11.8k Jul 31, 2022
A keystone engine powered Windows Debugger extension

DbgKeystone A Keystone engine powered Windows Debugger extension Reasoning WinDbg's default assember (the a command) can't handle instructions involvi

Michael B. 10 Jul 5, 2022
A cross-platform flutter plugin for C/C++/ObjC crash report via Google Breakpad

quick_breakpad A cross-platform flutter plugin for C/C++/ObjC crash report via Google Breakpad Use breakpad for quick_breakpad_example $CLI_BREAKPAD i

Woodemi Co., Ltd 16 Jul 30, 2022
A Cross-Platform(Web, Android, iOS) app to Generate Faces of People (These people don't actually exist) made using Flutter.

?? ?? Flutter Random Face Generator A flutter app to generate random faces. The Generated faces do not actually exist in real life (in other words you

Aditya 68 Jul 21, 2022
[WIP] A media playback library for Dart & Flutter apps on Windows & Linux. Based on libVLC & libVLC++.

dart_vlc Bringing power of VLC to Flutter & Dart apps on Windows & Linux Installation dependencies: ... dart_vlc: ^0.0.1 Documentation Create a ne

Hitesh Kumar Saini 353 Aug 2, 2022
Acrylic & aero blur effect on Flutter Windows 💙.

flutter_acrylic Acrylic & aero blur effect on Flutter Windows. Installation Mention in your pubspec.yaml.

Hitesh Kumar Saini 379 Aug 6, 2022
Flutter plugin serving utilities related to Windows taskbar. 💙

windows_taskbar Flutter plugin serving utilities related to Windows taskbar ?? Install dependencies: windows_taskbar: ^0.0.1 Demo Checkout the exam

Hitesh Kumar Saini 89 Jul 26, 2022
Implements a Windows service (in a DLL) that removes the rounded corners for windows in Windows 11

ep_dwm Implements a Windows service that removes the rounded corners for windows in Windows 11. Tested on Windows 11 build 22000.434. Pre-compiled bin

Valentin-Gabriel Radu 16 Jun 18, 2022
2D Vector Graphics Engine Powered by a JIT Compiler

Blend2D 2D Vector Graphics Powered by a JIT Compiler. Official Home Page (blend2d.com) Official Repository (blend2d/blend2d) Public Chat Channel Zlib

Blend2D 1.1k Jul 28, 2022
A C/C++ minor mode for Emacs powered by libclang

Irony-Mode A C/C++ minor mode powered by libclang irony-mode is an Emacs minor-mode that aims at improving the editing experience for the C, C++ and O

Guillaume Papin 892 Jul 31, 2022
C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more

Archived cquery is no longer under development. clangd and ccls are both good replacements. cquery cquery is a highly-scalable, low-latency language s

Jacob Dufault 2.3k Jul 27, 2022
A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.

libpostal: international street address NLP libpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP a

openvenues 3.5k Jul 28, 2022