zikzak_inappwebview 5.0.1
zikzak_inappwebview: ^5.0.1 copied to clipboard
A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
🚀 ZikZak InAppWebView #
The Feature-Rich WebView Plugin for Flutter #
A Flutter plugin that allows you to add an inline WebView, use an headless WebView, and open an in-app browser window.
This is a community-driven fork of flutter_inappwebview focused on active maintenance, stability, and modern platform support.
✨ Key Features #
- Cross-Platform: Support for Android, iOS, Web, macOS, Windows, and Linux.
- In-App Browser: Open a full-featured browser window inside your app.
- Headless WebView: Run WebView in the background without a UI.
- Rich API: Extensive control over navigation, cookies, scripts, and more.
- Modern Security: Enhanced security features and updates.
🧭 Navigation Tracker & Session Recipes #
Two pure-Dart modules (no native code) built on the same UserScript + JS-bridge architecture as Network Capture:
NavigationTracker (lib/src/navigation_tracker/) — a unified, ordered URL-cycle stream for a webview. Merges onLoadStart/onUpdateVisitedHistory/server-redirect callbacks with an injected script that patches history.pushState/replaceState and listens to popstate/hashchange/pageshow, deduplicated into UrlCycleEntry records (url, timestamp, trigger, isMainFrame). Useful anywhere you need navigation history.
Session Recipe (lib/src/session_recipe/) — guided multi-step session recording and DOM-based replay:
final recorder = RecipeRecorder.maybeCreate(recipe: myRecipe, onEvent: (event) { /* live UI feedback */ });
InAppWebView(
initialUserScripts: RecipeRecorder.mergeUserScripts(null, recorder),
onWebViewCreated: recorder.attach,
onLoadStart: (_, url) => recorder.onLoadStart(url),
onUpdateVisitedHistory: (_, url, __) => recorder.onUpdateVisitedHistory(url),
onNetworkRequest: (_, req) => recorder.onNetworkRequest(req), // signal matching
onNetworkResponse: (_, res) => recorder.onNetworkResponse(res),
);
// User confirms each step; finish() snapshots cookies into the recording.
final recording = await recorder.finish();
// Later: restore the session and replay steps via recorded DOM selectors.
final result = await RecipeReplayer().replay(
controller: controller, recipe: myRecipe, recording: recording,
);
All models are storage-agnostic JSON (toJson/fromJson) — persist recordings however you like. See test/session_recipe/ and test/navigation_tracker/ for usage examples.
� Installation #
Installation #
Add zikzak_inappwebview to your pubspec.yaml:
dependencies:
zikzak_inappwebview: ^4.6.0
Requirements #
| Platform | Minimum Version | Notes |
|---|---|---|
| Flutter | 3.10.0+ | |
| Android | API 24+ | Android 7.0+ |
| iOS | 16.0+ | |
| macOS | 12.0+ | |
| Windows | 10+ | Requires WebView2 Runtime |
| Linux | Requires WebKitGTK 2.40+ | |
| Web | Any |
🚀 Getting Started #
Check out the online documentation for comprehensive guides and examples.
import 'package:zikzak_inappwebview/zikzak_inappwebview.dart';
// ... inside your widget tree
InAppWebView(
initialUrlRequest: URLRequest(url: WebUri("https://flutter.dev")),
onWebViewCreated: (controller) {
// Controller is ready!
},
)
🤝 Contributing #
Contributions are welcome! If you find a bug or have a feature request, please open an issue.
⚖️ License #
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.