Skip to content
pubscout

webview_cef

0.6.2, released 3 months ago by an unverified publisher

Desktop WebView powered by Chromium Embedded Framework (CEF).

$ flutter pub add webview_cef
Source repository

What it does

Provides a Flutter widget that renders web content using a full Chromium engine on Windows, macOS, and Linux. It offers GPU zero‑copy rendering, JavaScript bridge, cookie management, and multi‑instance support.

AI-written summary of version 0.6.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need full desktop‑class web standards (WebGL, HTML5 video, etc.)
  • You want high‑performance rendering with zero‑copy GPU paths
  • You require a JavaScript‑to‑Dart bridge or custom user‑script injection

Skip it when

  • Targeting mobile platforms only
  • You need a minimal binary size or want to avoid native C++ toolchains
  • You prefer a plug‑and‑play webview without extra build steps

Strengths

  • Full Chromium engine with modern web standards
  • GPU zero‑copy rendering on Windows/macOS
  • Adaptive frame‑rate and real‑time IME support
  • Multiple independent webview instances

Weaknesses

  • Requires C++20 toolchain and large CEF download (~330 MB)
  • Complex native setup (modify runner code, podfile hooks)
  • Only works on desktop platforms

Setup

Kind
Plugin (native code)
Effort
High
Code generation
No
Direct dependencies
0

Add dependency, edit windows/runner/main.cpp to init CEF and forward messages, add macOS podfile post_install hook to embed CEF helpers, set WEBVIEW_CEF_MACOS_ARCH if needed, ensure C++20 compiler, download CEF binaries on first build.

import 'package:webview_cef/webview_cef.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: WebViewCef(
          initialUrl: 'https://flutter.dev',
        ),
      ),
    );
  }
}

Alternatives

Packages that do the same job and could replace webview_cef.

  • webview_flutter

    Simpler setup, works on mobile and desktop with no native C++ requirements, but lacks full Chromium features and zero‑copy rendering.