simple_webview_bridge 1.0.0 copy "simple_webview_bridge: ^1.0.0" to clipboard
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_flutter and package_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.postMessage API 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
0
likes
150
points
125
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter WebView widget that automatically injects app context (app ID and platform) into web pages via postMessage API

Repository (GitHub)
View/report issues

Topics

#webview #bridge #postmessage #flutter #widget

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, package_info_plus, webview_flutter

More

Packages that depend on simple_webview_bridge