simple_webview_bridge 1.0.0
simple_webview_bridge: ^1.0.0 copied to clipboard
A Flutter WebView widget that automatically injects app context (app ID and platform) into web pages via postMessage API
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2024-10-16 #
Added #
- Initial release of SimpleWebViewBridge widget
- Automatic injection of app context (app ID and platform) into web pages
- Support for both iOS and Android platforms
- Integration with
webview_flutterandpackage_info_plus - Customizable callback functions for page loading events
- JavaScript mode configuration support
Features #
- App Context Injection: Automatically posts app information to web pages via
window.postMessage - Cross-Platform: Works on both iOS and Android
- Easy Integration: Simple widget that wraps WebView with additional functionality
- Package Information: Retrieves and injects the app's package name/bundle identifier
- Platform Detection: Automatically detects and reports the current platform
Technical Details #
- Uses
window.postMessageAPI to communicate with web pages - Sends JSON payload:
{type: "APP_CONTEXT", appId: "com.example.app", platform: "android|ios"} - Injects context automatically when each page finishes loading