Giter VIP home page Giter VIP logo

webview_cef's Introduction

webview_cef Pub.dev likes Pub.dev points latest version Platform

Flutter Desktop webview backed by CEF (Chromium Embedded Framework). *Still working in progress

requirements

  • Windows 7+
  • macOS 10.12+

How To Use

Windows

Inside your application folder, you need to add two lines in your windows\runner\main.cpp.(Because of Chromium multi process arch.)

#include "webview_cef/webview_cef_plugin_c_api.h"

int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
                      _In_ wchar_t *command_line, _In_ int show_command) {
  //start cef deamon processes. MUST CALL FIRST
  initCEFProcesses();

When first time building the project, a prebuilt cef bin package (200MB, link in release) will be downloaded automatically, hence you may wait for a longer time if you are building the project for the first time.

macOS

1.Download prebuilt cef bundles from arm64 or intel depends on your target machine arch.

Note: You can also download universal binary for build an mac-universal app if you want to build an mac universal app. See #30. Thanks to @okiabrian123.

2.Unzip the archieve and put all files into macos/third/cef.

3.Run the example app.

[HELP WANTED!] Finding a more elegant way to distribute the prebuilt package.

Notice: currently the project haven't enable multi process mode because of debug convenience. You may want enable multi process mode by changing the implementation and built your own helper bundle. (Finding a more elegant way in the future)

todos (PR welcome!)

  • macos support
  • Linux support
  • multi instance support
  • IME support
  • mouse events support
  • js bridge support
  • release to pub
  • trackpad support (flutter 3.3)
  • better macos binary distribution
  • easier way to integrate macos helper bundles(multi process)
  • devTools support

demo

Windows

demo_compressed image image image

macOS

image image image

thanks

This project inspired by https://github.com/jnschulze/flutter-webview-windows

webview_cef's People

Contributors

hlwhl avatar doflatango 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.