# BridgeWebView for Flutter (Developers Preview)

[![pub package](https://img.shields.io/pub/v/flutter_js_bridge.svg)](https://pub.dartlang.org/packages/flutter_js_bridge)

A Flutter plugin that provides a Bridge WebView widget which can communicate with js.

On iOS the WebView widget is backed by a [WKWebViewJavascriptBridge](https://github.com/Lision/WKWebViewJavascriptBridge);
On Android the WebView widget is backed by a [WebView](https://github.com/lzyzsd/JsBridge).

## Developers Preview Status
The plugin relies on Flutter's new mechanism for embedding Android and iOS views.
As that mechanism is currently in a developers preview, this plugin should also be
considered a developers preview.

To use this plugin on iOS you need to opt-in for the embedded views preview by
adding a boolean property to the app's `Info.plist` file, with the key `io.flutter.embedded_views_preview`
and the value `YES`.

## Setup

### iOS
Opt-in to the embedded views preview by adding a boolean property to the app's `Info.plist` file
with the key `io.flutter.embedded_views_preview` and the value `YES`.

## Usage
Add `flutter_js_bridge` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/).

You can now include a BridgeWebView widget in your widget tree.
See the WebView widget's Dartdoc for more details on how to use the widget.
