パッケージ、リポジトリ、アプリカテゴリを検索

webview_windows のカバー
パッケージ詳細v0.4.0

webview_windows

Windows プラットフォーム用の WebView2 ベースの WebView 実装。

Windows
30日間ダウンロード
7.7万
いいね数
236
Pub ポイント
140

パッケージをインストール

flutter pub add webview_windows

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

Windows用にWebView2を活用したWebビュー実装を提供するFlutterパッケージで、デスクトップアプリケーション内でのWebコンテンツのシームレスな統合を可能にします。Windowsプラットフォーム専用に開発されており、Chromiumに基づくMicrosoftのWebView2コントロールを使用することで、最新のWeb互換性とパフォーマンスを確保しています。このパッケージでは、Webページの表示、ナビゲーションの処理、DartからJavaScriptとの相互作用が可能です。URLの読み込み、ナビゲーションイベント、基本的なスクリプティングといった一般的なWebビュー機能をサポートしています。Flutterで構築されたWindowsデスクトップアプリにWebベースのUIやコンテンツを埋め込むのに最適です。

用途

  • Windowsデスクトップアプリケーションにウェブコンテンツを埋め込む
  • 動的なWebベースのインターフェースを表示しています
  • デスクトップアプリケーションへのウェブサービスの統合
  • Web コンポーネントを使用したハイブリッドデスクトップアプリケーションの構築
  • 埋め込みウェブビューで豊かなユーザー体験を実現する

主な機能

  • Windows 上の WebView2 ベースのレンダリング
  • Chromium をベースとしたウェブエンジン
  • JavaScript インタラクションサポート
  • ナビゲーションイベント処理
  • Flutter デスクトップとクロスプラットフォーム互換

適している対象

  • Windows デスクトップ向けの Flutter 開発者
  • 埋め込みWebコンテンツを必要とするアプリ
  • Web コンポーネントを使用したハイブリッドデスクトップアプリケーション
  • Windows上でモダンなWebレンダリングが必要な開発者
  • Windows 固有の機能に WebView2 を使用するプロジェクト

注意事項

  • Windows専用のプラットフォームサポート
  • WebView2 ランタイムのインストールが必要です
  • Windows デスクトップ環境に限定
  • 本番デプロイには追加の設定が必要になる場合があります
  • ターゲットシステム上の WebView2 コントロールの利用可能性に依存します

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト