Code Monkey home page Code Monkey logo

desktop_webview_window's Introduction

desktop_webview_window

Pub

Show a webview window on your flutter desktop application.

Windows Webview2 1.0.992.28
Linux WebKitGTK-4.1
macOS WKWebview

Getting Started

  1. modify your main method.

    import 'package:desktop_webview_window/desktop_webview_window.dart';
    
    void main() async {
      WidgetsFlutterBinding.ensureInitialized();
      
      // Add this your main method.
      // used to show a webview title bar.
      if (runWebViewTitleBarWidget(args)) {
        return;
      }
    
      runApp(MyApp());
    }
    
  2. launch WebViewWindow

      final webview = await WebviewWindow.create();
      webview.launch("https://example.com");

linux requirement

sudo apt-get install webkit2gtk-4.1

Windows requirement

The backend of desktop_webview_window on Windows is WebView2, which requires WebView2 Runtime installed.

WebView2 Runtime is ship in box with Windows11, but it may not installed on Windows10 devices. So you need consider how to distribute the runtime to your users.

See more: https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution

For convenience, you can use WebviewWindow.isWebviewAvailable() check whether the WebView2 is available.

License

see LICENSE

desktop_webview_window's People

Contributors

momo2555 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.