Skip to content

Overview: What ZikZak InAppWebView Is and Why It Matters

This page is the entry point to the documentation. It answers one question before you write any code: what is ZikZak InAppWebView, what problem does it solve, and what does the repository actually contain? By the end you will know the three ways to embed web content, the platforms and minimum runtimes, how the monorepo’s packages fit together, and which reading path to follow next. Everything here is verified against the checked-out source at version 6.7.0; deeper mechanics live on their own pages.

ZikZak InAppWebView is a Flutter plugin that puts a real, system WebView inside your Flutter app — inline in your widget tree, invisible in the background, or inside a full browser window with a toolbar. It is a community-driven fork of flutter_inappwebview, focused on active maintenance, stability, and modern platform support, and it reaches Android, iOS, Web, macOS, Windows, and Linux through one app-facing package.

The reason it matters is specific: Flutter gives you excellent native UI but no first-party way to render arbitrary web content with script control, cookie access, and navigation interception. This plugin supplies that surface — evaluateJavascript, user scripts, callHandler round-trips, cookies and web storage, content blockers, proxy and tracing, downloads, printing, passkeys — behind a single Dart API that resolves to a different native engine per platform.

Sources: README.md, zikzak_inappwebview/pubspec.yaml, zikzak_inappwebview/lib/zikzak_inappwebview.dart

Every capability in the repository serves one of three embedding modes. Deciding which mode you need tells you which classes you will ever touch — and which documentation pages matter.

Mode Entry point Visible UI? Typical use
Inline WebView InAppWebView widget Yes — a composited platform view in your widget tree Embedded pages, checkout flows, docs viewers, hybrid screens
Headless WebView HeadlessInAppWebView No — renders off-screen Scraping, pre-rendering, token acquisition, data extraction
In-app browser InAppBrowser / ChromeSafariBrowser Yes — a separate browser window with toolbar and progress OAuth flows, external links that must stay in-app

The inline widget is the primary API: you pass an initialUrlRequest and receive a controller through onWebViewCreated. That controller is your handle for everything else, and it is deliberately not a monolith — its growing surface is grouped into four lazily created domain facades (navigation, javaScript, cookies, settings) while the original flat methods remain as thin delegates.

Sources: in_app_webview.dart, in_app_webview_controller.dart, in_app_browser.dart

The plugin reaches six platforms through genuinely different native technologies, not one abstraction wrapped six times. That difference is the single most important thing to understand before forming expectations about behavior parity.

Platform Native engine Language / layer Minimum runtime
Android androidx.webkit 1.15.0 Java 17 API 24+ (Android 7.0)
iOS WKWebView via Swift Package Manager Swift iOS 15.0+
macOS WKWebView via Swift Package Manager Swift macOS 12.0+
Windows WebView2 via the zikzak_webview_windows fork Dart facade + C++ fork Windows 10 + WebView2 Runtime
Linux WPE WebKit, headless WPEPlatform backend C++ WPE WebKit 2.50+
Web Browser DOM via dart:js_interop / package:web Pure Dart Any modern browser

Flutter’s floor is 3.50.0 (Dart SDK >=3.13.0) across the published packages, raised because the iOS platform-view “rendering layer confusion” regression is fixed only from that release. An optional, unendorsed zikzak_inappwebview_ohos package implements the same factories against the system ArkWeb engine on HarmonyOS/OHOS; it does not change the platforms or minimum Flutter versions above.

Sources: README.md, build.gradle, Package.swift, zikzak_inappwebview_linux/pubspec.yaml, zikzak_inappwebview_ohos/pubspec.yaml

The repository is a monorepo of independent pub packages that together form one federated plugin. It is not an app and not one package with folders: your application depends on exactly one package — the umbrella zikzak_inappwebview — and Flutter resolves the matching platform implementation at build time through default_package wiring.

graph TD
App["Your Flutter App"] --> Umbrella["zikzak_inappwebview<br/>umbrella · v6.7.0<br/>widget + controller facades"]
Umbrella --> PI["zikzak_inappwebview_platform_interface<br/>abstract facades + Zorphy entities"]
Umbrella --> Android["zikzak_inappwebview_android<br/>Java · androidx.webkit"]
Umbrella --> iOS["zikzak_inappwebview_ios<br/>Swift · WKWebView · SPM"]
Umbrella --> macOS["zikzak_inappwebview_macos<br/>Swift · WKWebView · SPM"]
Umbrella --> Win["zikzak_inappwebview_windows<br/>Dart facade"]
Umbrella --> Linux["zikzak_inappwebview_linux<br/>C++ · WPE WebKit"]
Umbrella --> Web["zikzak_inappwebview_web<br/>pure Dart · js_interop"]
Win --> Fork["zikzak_webview_windows<br/>BSD-3 fork · WebView2 DevTools"]
Module["zikzak_inappwebview_module<br/>intelligence tier · dev-only"] -.->|"public API only"| Umbrella
style PI fill:#e8f0ff
style Fork fill:#fff0e0
style Module fill:#f0ffe8

Read the diagram top-down: the platform interface is the seam. It declares an abstract InAppWebViewPlatform plus one abstract facade per capability, and each platform package supplies the concrete implementation and registers itself as the instance. Nothing in the umbrella knows which engine it is talking to. The orange node is the one structural exception: Windows’ native WebView2 layer lives in a renamed BSD-3 fork that carries the DevTools protocol API no hosted webview_windows release has. The green dotted node is the dev-only intelligence tier, which may depend only on the umbrella’s public API.

Sources: inappwebview_platform.dart, platform_inappwebview_widget.dart, zikzak_inappwebview/pubspec.yaml, zikzak_webview_windows/pubspec.yaml

Nine packages publish to pub.dev in a strict dependency order; the module is development-only (publish_to: none), and OHOS is an optional add-on. All published packages currently share the 6.7.0 version line.

# Package Role
1 zikzak_inappwebview_platform_interface The contract seam: abstract facades, method channels, Zorphy entity model layer
2–7 zikzak_inappwebview_{android,ios,macos,web,windows,linux} One platform implementation each
8 zikzak_webview_windows BSD-3 fork of webview_windows 0.4.0 with the WebView2 DevTools protocol API
9 zikzak_inappwebview The umbrella — the only package your app imports
— zikzak_inappwebview_module Intelligence tier (pool, capture, VCR, recipes); never published
— zikzak_inappwebview_ohos Optional, unendorsed ArkWeb implementation for OpenHarmony

Your first import pulls the umbrella barrel, which re-exports the platform interface (hiding internal channel and utility classes), the umbrella’s feature-grouped src/main.dart, and portable webview sessions.

Sources: zikzak_inappwebview/pubspec.yaml, zikzak_inappwebview_module/pubspec.yaml, zikzak_inappwebview_web/pubspec.yaml, zikzak_inappwebview_windows/pubspec.yaml, zikzak_inappwebview.dart

Two Tiers: Thin Core and Intelligence Layer

Section titled “Two Tiers: Thin Core and Intelligence Layer”

The most consequential architectural decision here is a deliberate split into two tiers, documented class-by-class in the split map. The Core tier stays in the umbrella: widgets, controller facades, the platform interface, and native packages — raw platform APIs only. The Module tier holds all policy, state, and intelligence: the WebView pool, capture distillation, VCR cassettes, dialogue dismissal, session recipes, and navigation tracking.

The module may depend on only seven named things from the core — the InAppWebView widget, InAppWebViewController, HeadlessInAppWebView, CookieManager, the raw capture-event stream, InAppBrowser, and ChromeSafariBrowser — and must never import platform-interface internals. This is enforced mechanically: scripts/grep_gate.sh fails if a module-tier identifier appears in the core, or if the module imports the platform interface directly. For a beginner, the practical value is that it tells you where a new feature belongs: “call the native API” goes in core; “decide, cache, pool, filter, or record” goes in the module.

Sources: SPLIT_MAP.md, SPLIT_MAP.md, grep_gate.sh

zikzak_inappwebview/ ← the umbrella you import
lib/zikzak_inappwebview.dart ← public barrel
lib/src/
in_app_webview/ ← widget, controller, headless, registry,
│ four domain controllers, network capture
in_app_browser/ ← browser window
chrome_safari_browser/ ← SFSafariViewController / Custom Tabs
cookie_manager.dart proxy_controller.dart tracing_controller.dart
web_storage/ web_message/ webview_environment/ print_job/
navigation_tracker/ session_recipe/ dialogue_dismisser/ ← intelligence
webview_sessions/ ← portable sessions
example/ ← runnable app + integration_test/ (E2E)
zikzak_inappwebview_platform_interface/ ← the seam; entities in domain/entities/
zikzak_inappwebview_{android,ios,macos,windows,linux,web}/ ← implementations
zikzak_webview_windows/ ← forked WebView2 native layer
zikzak_inappwebview_module/ ← intelligence tier (dev-only)
zikzak_inappwebview_ohos/ ← optional ArkWeb implementation
specs/ 18 feature folders (spec · plan · tasks · tdd)
.specify/ constitution, bugs/ (34), extensions, workflows
scripts/ publish + grep_gate + local CI

Two adjacent directories are easy to mistake for the product: orders_lab/ is a real Flutter app built on the plugin, and the .agents/, .claude/, .kimi-code/, .opencode/ trees are AI-agent skill definitions, not runtime code.

Sources: zikzak_inappwebview/lib/src/main.dart, CONSUMER_TRANSITION_PLAN.md, AGENTS.md

The umbrella’s src/main.dart is the map of what you can import. The table below groups the beginner-relevant entry points; each has a dedicated page later in this wiki.

Area Public class What it gives you
Inline view InAppWebView The widget; creation params, callbacks, and settings
Controller InAppWebViewController navigation, javaScript, cookies, settings facades plus flat delegates
Headless HeadlessInAppWebView Off-screen WebView with a process-wide live cap and a registry
Browser InAppBrowser, ChromeSafariBrowser In-app browser window and system custom tabs
Storage CookieManager, WebStorage, WebStorageManager Cookie and local/session storage access
Environment WebViewEnvironment Windows WebView2 runtime selection and version checks
Messaging WebMessageChannel, WebMessageListener, WebMessagePort Structured two-way page messaging
Security WebAuthenticationSession, passkey bridge setting WebAuthn ceremonies inside embedded content

Settings themselves are a generated value object (InAppWebViewSettings) with a large, platform-varying surface — for example useShouldOverrideUrlLoading, passkeyBridgeEnabled, and the networkCapture* family. The full option reference belongs to the widget/controller page, not this overview.

Sources: main.dart, in_app_webview_settings.dart, webview_environment.dart

Constructing a headless WebView does not start it. The native instance is created and the URL loaded only when run() is called; before that, evaluateJavascript has nothing to talk to. The headless tier also enforces a process-wide live-instance cap — default 3 on iOS and Android, 5 on macOS, 8 elsewhere — configurable through HeadlessInAppWebView.maxLiveWebViews before the first run(). Values below 1 are rejected, and changing the cap while instances are live throws a StateError.

The JavaScript bridge global was renamed. The injected global is window.zikzak_inappwebview, not window.flutter_inappwebview; call handlers through window.zikzak_inappwebview.callHandler(...). The flutterInAppWebViewPlatformReady event name is unchanged. This is the one required code change when porting web code from upstream.

Disposal is a three-state lifecycle, not a boolean. dispose(isKeepAlive: true) releases Dart-side ownership while retaining the native view; a later plain dispose() must still fully release it. Only identical repeats are no-ops, which is why a single _disposed flag was replaced by an explicit DisposeLifecycle enum.

The model layer is generated, not hand-written. Entity families live under domain/entities/ as a hand-written Zorphy-annotated file plus generated .zorphy.dart and .g.dart parts. Never edit the generated files; regenerate them with build_runner in the platform-interface package.

Sources: headless_in_app_webview.dart, headless_in_app_webview.dart, README.md, dispose_lifecycle.dart, AGENTS.md

Forks usually decay; this one carries the machinery of a maintained product. Four verifiable signals stand out. First, TDD is a constitutional non-negotiable: every behavior change starts from a test observed failing, recorded in specs/<feature>/tdd/cycle-log.md, and tests are never weakened to reach green. Second, CI actually compiles the hard targets: a per-package analyze/test matrix plus dedicated jobs that build the Linux WPE plugin on amd64 and arm64 and resolve a minimal consumer on the declared Flutter floor. Third, work is spec-driven with an audit trail: 18 feature folders under specs/ and 34 bug folders under .specify/bugs/. Fourth, platform knowledge is written down in INSIGHTS.md and the changelog, where each entry names the issue it closes.

Sources: constitution.md, ci.yml, ci.yml, CHANGELOG.md

Use it if you need… Look elsewhere if…
Real script control: evaluateJavascript, user scripts, callHandler round-trips Only a static HTML string rendered as text
Cookie/storage access, per-profile isolation, or portable sessions Pixel-identical rendering across all six engines — the engines genuinely differ
A headless browser for scraping or pre-rendering Web screenshot/PDF support (deliberately stubbed on Web)
OAuth, passkeys, or file uploads inside embedded content Support below Flutter 3.50 / Android API 24 / iOS 15
A plugin with a documented position on 156+ upstream issues A first-party, official Flutter plugin

Sources: README.md, README.md, zikzak_inappwebview_web/pubspec.yaml

Work through Get Started in order — each page assumes the previous one.

  1. Quick Start: Your First Inline WebView — get a WebView rendering on your machine today.
  2. Installation and Platform Requirements — the exact SDK floors, native prerequisites, and per-platform setup.
  3. Migrating from flutter_inappwebview — the import swap and the bridge-global rename in detail.
  4. The JavaScript Bridge Global and Handler Wiring — how callHandler round-trips work end to end.
  5. Example App and Screen-by-Screen Walkthrough — every screen in the runnable example, explained.

Then enter Deep Dive. For the architectural spine first, read Monorepo Layout and the Federated Plugin Model, The Platform Interface: The Contract Seam, and Two-Tier Core/Module Split and the Grep Gate. For the APIs you will actually call, continue with InAppWebView Widget and InAppWebViewController, Headless WebView and the Live-Instance Cap, and Domain Controller Facades: Navigation, JavaScript, Cookies, Settings.