Installation and Platform Requirements
Installing zikzak_inappwebview takes a single dependency entry in your Flutter application’s pubspec.yaml because the package acts as a federated umbrella plugin that automatically pulls in the endorsed native implementations for your target platforms. However, each operating system enforces specific minimum OS versions, native runtime libraries, and privacy or permission declarations before a WebView can render and execute JavaScript. This guide walks beginner developers through adding the package, understanding cross-platform SDK and OS requirements, configuring platform-specific prerequisites, and troubleshooting common setup errors.
Sources: README.md, zikzak_inappwebview/pubspec.yaml
1. Adding the Package to Your Flutter App
Section titled “1. Adding the Package to Your Flutter App”In standard Flutter applications, you only need to declare one dependency: zikzak_inappwebview (currently at version 6.7.0). Under the hood, the umbrella package declares default platform implementations for Android, iOS, macOS, Web, Windows, and Linux in its flutter.plugin.platforms section. When you run flutter pub get, the Dart package manager automatically resolves the umbrella package alongside zikzak_inappwebview_platform_interface and the matching platform packages for the devices you build for. You never need to manually add zikzak_inappwebview_android, zikzak_inappwebview_ios, or other endorsed sub-packages to a standard application’s pubspec.yaml.
Sources: zikzak_inappwebview/pubspec.yaml, zikzak_inappwebview/pubspec.yaml, zikzak_inappwebview_android/README.md
Step-by-Step Installation Flow
Section titled “Step-by-Step Installation Flow”The diagram below illustrates how flutter pub get resolves the umbrella package and dispatches to the correct native backend when you build for a target platform:
flowchart TD A[Add zikzak_inappwebview: ^6.7.0 to pubspec.yaml] --> B[Run flutter pub get] B --> C{Target Platform Build} C -->|Android| D[zikzak_inappwebview_android + Android WebView] C -->|iOS / macOS| E[zikzak_inappwebview_ios / _macos + WKWebView via SPM] C -->|Web| F[zikzak_inappwebview_web + HTML iframe] C -->|Windows| G[zikzak_inappwebview_windows + zikzak_webview_windows WebView2] C -->|Linux| H[zikzak_inappwebview_linux + WPE WebKit] C -->|OpenHarmony| I[Optional: zikzak_inappwebview_ohos + ArkWeb]To add the dependency using the Flutter CLI, run flutter pub add zikzak_inappwebview in your application directory, or manually add the entry shown below to your app’s pubspec.yaml:
dependencies: flutter: sdk: flutter zikzak_inappwebview: ^6.7.0Once installed, importing package:zikzak_inappwebview/zikzak_inappwebview.dart exposes the umbrella barrel file, which re-exports the platform interface types and core widgets such as InAppWebView, HeadlessInAppWebView, and InAppBrowser.
Sources: README.md, zikzak_inappwebview/lib/zikzak_inappwebview.dart
Optional and Unendorsed Packages
Section titled “Optional and Unendorsed Packages”Two packages in the monorepo are not automatically included when you depend on zikzak_inappwebview:
- OpenHarmony (
zikzak_inappwebview_ohos): This is an unendorsed federated implementation powered by the system ArkWeb engine. If you are building for HarmonyOS / OpenHarmony, you must explicitly addzikzak_inappwebview_ohosto yourpubspec.yamlalongsidezikzak_inappwebviewso OHOS Flutter registersOhosInAppWebViewPlatform. - Value-Add Module (
zikzak_inappwebview_module): Currently markedpublish_to: none(0.0.1-dev) in the repository, this development module consumes the core public API to provide webview pooling, VCR cassettes, and agent tooling.
Sources: README.md, zikzak_inappwebview_ohos/README.md, zikzak_inappwebview_module/pubspec.yaml
2. Cross-Platform SDK and Operating System Requirements
Section titled “2. Cross-Platform SDK and Operating System Requirements”Every package in the zikzak_inappwebview fleet shares a unified Dart SDK constraint (>=3.13.0 <4.0.0) and Flutter framework floor (>=3.50.0). Flutter 3.50.0 (which bundles Dart 3.14.0) is the required minimum because Flutter 3.47.x introduced an upstream iOS texture-layer hybrid composition regression (issue #331) where Flutter widgets painted after a platform view vanished under modal overlays or lazy lists; that rendering defect was resolved in the Flutter engine starting at 3.50.0. Additionally, transitive dependencies in the zuraffa_session: ^7.5.0 package require meta ^1.19.0, which in turn requires Flutter 3.47.0 or newer.
Sources: zikzak_inappwebview/pubspec.yaml, zikzak_inappwebview/pubspec.yaml, .github/workflows/ci.yml, README.md
Minimum Version Reference Table
Section titled “Minimum Version Reference Table”The table below summarizes the minimum runtime and build requirements across all supported targets. While Flutter enforces the Dart/Flutter SDK constraint during dependency resolution, native operating system versions and system libraries must be satisfied on the host build machine and end-user devices:
| Platform | Minimum OS / Runtime Version | Build & Native Requirements | Endorsement Status |
|---|---|---|---|
| Flutter SDK | 3.50.0+ (Dart 3.13.0+) | Required across all packages to avoid iOS TLHC overlay bugs (#331) and satisfy meta ^1.19.0 |
Umbrella requirement |
| Android | API 24+ (Android 7.0 Nougat) | compileSdk 36, Java 17 (VERSION_17), AGP 8.13.1+, androidx.webkit:webkit:1.15.0 |
Endorsed (zikzak_inappwebview_android) |
| iOS | 15.0+ | Xcode with Swift 5.9+ (swift-tools-version: 5.9), Swift Package Manager (OrderedSet 6.0.3+) |
Endorsed (zikzak_inappwebview_ios) |
| macOS | 12.0+ | Xcode with Swift 5.9+ (swift-tools-version: 5.9), Swift Package Manager |
Endorsed (zikzak_inappwebview_macos) |
| Windows | Windows 10 (1809+) | Microsoft Edge WebView2 Runtime, Visual Studio 2019+, Windows 11 SDK (10.0.22000.194+) |
Endorsed (zikzak_inappwebview_windows) |
| Linux | WPE WebKit 2.50+ | CMake 3.10+, C++17, pkg-config modules: wpe-webkit-2.0, wpe-platform-2.0, wpe-platform-headless-2.0, wpe-1.0 |
Endorsed (zikzak_inappwebview_linux) |
| Web | Any modern browser | Compiled via package:web: ^1.1.1 and flutter_web_plugins |
Endorsed (zikzak_inappwebview_web) |
| OpenHarmony | API 23+ (OH Flutter 3.47+) | HarmonyOS/OpenHarmony SDK, ohos.permission.INTERNET in module.json5 |
Unendorsed (zikzak_inappwebview_ohos) |
Sources: README.md, zikzak_inappwebview_android/android/build.gradle, zikzak_inappwebview_ios/ios/zikzak_inappwebview_ios/Package.swift, zikzak_inappwebview_macos/macos/zikzak_inappwebview_macos/Package.swift, zikzak_webview_windows/README.md, zikzak_inappwebview_linux/README.md, zikzak_inappwebview_ohos/README.md
3. Platform-Specific Setup and Configuration
Section titled “3. Platform-Specific Setup and Configuration”While the Dart API remains identical across platforms, each native engine requires specific host configurations, manifest entries, or system packages to compile and operate properly.
Android Setup
Section titled “Android Setup”The Android native layer (zikzak_inappwebview_android) sets minSdkVersion 24 (Android 7.0+), compileSdkVersion 36, and targets Java 17 bytecode. It bundles consumer ProGuard rules (proguard-rules.pro) that automatically preserve @android.webkit.JavascriptInterface methods and wtf.zikzak.zikzak_inappwebview_android.** classes when code shrinking (minifyEnabled true) is enabled in release builds. Its AndroidManifest.xml merges InAppBrowserActivity, ChromeCustomTabsActivity, TrustedWebActivity, and DropDataProvider into your app, and declares a <queries> entry for android.support.customtabs.action.CustomTabsService so Android 11+ (API 30+) package visibility rules do not block Custom Tabs discovery. If your app loads remote URLs, ensure your app’s AndroidManifest.xml declares <uses-permission android:name="android.permission.INTERNET" />.
Sources: zikzak_inappwebview_android/android/build.gradle, zikzak_inappwebview_android/android/proguard-rules.pro, zikzak_inappwebview_android/android/src/main/AndroidManifest.xml
iOS and macOS (Apple Platforms) Setup
Section titled “iOS and macOS (Apple Platforms) Setup”Both iOS and macOS packages use Swift Package Manager (SPM) with swift-tools-version: 5.9 and declare minimum deployment targets of iOS 15.0 and macOS 12.0. On iOS, the package links against OrderedSet (https://github.com/Weebly/OrderedSet.git, from: "6.0.3") and includes a compiled PrivacyInfo.xcprivacy manifest declaring NSPrivacyTracking: false and required-reason APIs (UserDefaults CA92.1, FileTimestamp C617.1, DiskSpace E174.1).
For macOS sandboxed apps (and iOS apps using getUserMedia() camera/microphone capture), two host configurations are mandatory in your Runner target:
Info.plistUsage Descriptions: WithoutNSCameraUsageDescriptionandNSMicrophoneUsageDescription, the system TCC layer silently denies media capture even ifonPermissionRequestreturnsGRANT.- Entitlements (
DebugProfile.entitlements&Release.entitlements): Sandboxed macOS apps (com.apple.security.app-sandbox = true) must also declarecom.apple.security.network.client,com.apple.security.device.camera, andcom.apple.security.device.audio-input. For WebAuthn / passkey support on Apple platforms, addcom.apple.developer.associated-domainswithwebcredentials:<your-domain>and host an HTTPS/.well-known/apple-app-site-associationfile.
Sources: zikzak_inappwebview_ios/ios/zikzak_inappwebview_ios/Package.swift, zikzak_inappwebview_ios/ios/zikzak_inappwebview_ios/Sources/zikzak_inappwebview_ios/PrivacyInfo.xcprivacy, zikzak_inappwebview_macos/README.md, zikzak_inappwebview/example/macos/Runner/Info.plist, zikzak_inappwebview/example/macos/Runner/DebugProfile.entitlements
Linux (WPE WebKit) Setup
Section titled “Linux (WPE WebKit) Setup”The Linux backend renders web content off-screen using WPE WebKit and displays frames in Flutter as a GPU texture. Your system must provide WPE WebKit 2.50+ along with the WPEPlatform headless backend (wpe-platform-2.0, wpe-platform-headless-2.0, wpe-webkit-2.0, and wpe-1.0) discoverable via pkg-config, plus epoxy, gtk+-3.0, libsecret-1, and wayland-server. Because Ubuntu 24.04 does not package WPE WebKit 2.50+, developers on Debian/Fedora/Arch can use distribution packages, while Ubuntu users must build WPE WebKit from source and export PKG_CONFIG_PATH pointing to their install prefix’s lib/pkgconfig directory. Under CMake 4, building the Linux target requires passing CMAKE_POLICY_VERSION_MINIMUM=3.5.
Sources: zikzak_inappwebview_linux/README.md, zikzak_inappwebview_linux/README.md, zikzak_inappwebview_linux/linux/CMakeLists.txt
Windows (WebView2) Setup
Section titled “Windows (WebView2) Setup”Windows applications render web content off-screen via Microsoft Edge WebView2 (consumed through zikzak_webview_windows) using Windows.Graphics.Capture, which requires Windows 10 version 1809+ and the WebView2 Runtime installed on the device. During development, your build environment needs Visual Studio 2019 or newer and the Windows 11 SDK (10.0.22000.194+). At application startup, you can call getWebViewVersion() before creating a webview to verify that the WebView2 Runtime is present on the user’s machine.
Sources: zikzak_webview_windows/README.md, README.md
Web and OpenHarmony Setup
Section titled “Web and OpenHarmony Setup”The Web implementation (zikzak_inappwebview_web) is a pure Dart package using package:web and flutter_web_plugins with no native build steps beyond standard Flutter Web compilation (flutter build web). For OpenHarmony (OHOS), the unendorsed zikzak_inappwebview_ohos package requires an OHOS Flutter SDK 3.47.0+ (Dart 3.13.0+) and HarmonyOS/OpenHarmony API 23+ (since native cookie enumeration uses WebCookieManager.fetchAllCookies introduced in API 23). You must declare ohos.permission.INTERNET in your application’s module.json5 to permit network access inside ArkWeb.
Sources: zikzak_inappwebview_web/pubspec.yaml, zikzak_inappwebview_ohos/README.md, zikzak_inappwebview_ohos/pubspec.yaml
4. Monorepo Package Map and Local Development Overrides
Section titled “4. Monorepo Package Map and Local Development Overrides”When cloning the zikzak_inappwebview repository directly to contribute or test unreleased native changes, each package ships with a dependency_overrides section (or pubspec_overrides.yaml) that redirects hosted ^6.7.0 constraints to sibling local directories. pub publish strips dependency_overrides automatically via scripts/prepare_for_publish.sh, so published consumers on pub.dev always resolve clean hosted versions.
zikzak_inappwebview/ # Umbrella app-facing package (pubspec_overrides.yaml)├── lib/zikzak_inappwebview.dart # Exports platform_interface + src/main.dart├── zikzak_inappwebview_platform_interface/ # Shared contract models & settings├── zikzak_inappwebview_android/ # Android native implementation (Java / Gradle)├── zikzak_inappwebview_ios/ # iOS native implementation (Swift / SPM)├── zikzak_inappwebview_macos/ # macOS native implementation (Swift / SPM)├── zikzak_inappwebview_web/ # Web implementation (Dart / package:web)├── zikzak_inappwebview_windows/ # Windows facade package│ └── zikzak_webview_windows/ # Vendored WebView2 + DevTools fork├── zikzak_inappwebview_linux/ # Linux WPE WebKit implementation (C++ / CMake)├── zikzak_inappwebview_ohos/ # Unendorsed OpenHarmony ArkWeb implementation└── zikzak_inappwebview_module/ # Dev-only value-add module (pool, capture, VCR)Sources: zikzak_inappwebview/pubspec_overrides.yaml, scripts/prepare_for_publish.sh, AGENTS.md
5. Troubleshooting Installation and Platform Issues
Section titled “5. Troubleshooting Installation and Platform Issues”Beginner developers encountering build or runtime errors during setup can use the diagnostic matrix below to match the symptom to its root cause and resolution:
| Symptom / Error Message | Likely Cause | Resolution |
|---|---|---|
Pub solver failure suggesting downgrade to 5.x or equatable conflict |
Flutter SDK is older than 3.50.0 (e.g., 3.38–3.47), causing meta ^1.19.0 resolution failure |
Upgrade Flutter to 3.50.0 or newer (flutter upgrade) |
iOS widgets (AppBar, ListView) below InAppWebView turn invisible |
Running on Flutter 3.47.x (upstream TLHC regression #331) |
Upgrade Flutter to 3.50.0+ |
Linux CMake aborts with WPE WebKit not found |
Missing WPE pkg-config modules or custom install prefix not in PKG_CONFIG_PATH |
Install WPE WebKit 2.50+ and export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig |
| Linux CMake 4 build fails on googletest policy | CMake 4 dropped compatibility with CMake < 3.5 policies | Set CMAKE_POLICY_VERSION_MINIMUM=3.5 when building |
macOS getUserMedia() rejects with NotAllowedError |
Missing NSCameraUsageDescription / NSMicrophoneUsageDescription in Info.plist or missing sandbox entitlements |
Add camera/microphone usage strings and com.apple.security.device.* entitlements |
Windows webview or CookieManager fails to initialize |
Microsoft Edge WebView2 Runtime is not installed on the machine | Install WebView2 Runtime and verify with getWebViewVersion() |
| Android release build missing JS bridge methods | Custom ProGuard rules overriding plugin consumer rules | Keep default consumerProguardFiles 'proguard-rules.pro' enabled |
Sources: .github/workflows/ci.yml, .specify/chores/flutter-floor-bump-350/assessment.md, zikzak_inappwebview_linux/README.md, zikzak_inappwebview_macos/README.md, zikzak_webview_windows/README.md, zikzak_inappwebview_android/android/proguard-rules.pro
Recommended Next Steps
Section titled “Recommended Next Steps”Now that your environment and platform requirements are configured, follow this reading progression to start building and understanding the plugin:
- Quick Start: Your First Inline WebView — Put your installation to work by rendering your first web page and wiring controller callbacks.
- Migrating from flutter_inappwebview — If you are porting an existing app from upstream
flutter_inappwebview, review the import and JavaScript global updates. - Monorepo Layout and the Federated Plugin Model — Explore how the umbrella package and endorsed platform packages fit together architecturally.
- Android Native Layer (Java), Apple Native Layer (Swift and Swift Package Manager), Linux WPE WebKit Backend, Windows WebView2 Facade and the DevTools Fork, and Web and OpenHarmony (ArkWeb) Implementations — Dive into the specific native engine backing each platform.