BridgeWebView for Flutter (Developers Preview) #
A Flutter plugin that provides a Bridge WebView widget which can communicate with js.
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
and the value
Opt-in to the embedded views preview by adding a boolean property to the app's
with the key
io.flutter.embedded_views_preview and the value
flutter_js_bridge as a dependency in your pubspec.yaml file.
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.
- added the callback of page finished.
- added iOS webview support.
- fixed the android webview layout style.
- added customized WebChromeClient.
- fix bugs.
- add a new channel method.
- change the bridge callback to future.
- added a new channel registerBridgeChannels.
- debug webview to load loacal url.
- changed the implementation of bridge webview.
- add the return value of onBridgeHandler.
- set the default value of the prop hidden.
- added the methods show and hide.
- change to single child widget.
- test factory mode.
- added some logs to debug the factory mode.
- remove the webview id in android.
- remove the id.
- add a factory plugin class.
- Fixed the bug of json string.
- added the json encode.
- change the arguments of the method callHandler to json string.
- change the arguments to the type list.
- added some debug logs.
- added register handler callback.
- added register handler.
- added some logs.
- fixed the test codes.
- fixed the test codes.
- override the method onPageFinished.
- remove the navigation delegate.
- change the arguments type of the method callHandler.
- remove url check.
- add arguments for the method callHandler.
- add the method registerHandler.
- Initial release.
Demonstrates how to use the flutter_js_bridge plugin.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: flutter_bridge_webview: ^0.1.40
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Nov 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.0
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.6
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
lib/flutter_bridge_webview.dart. (-1.49 points)
lib/flutter_bridge_webview.dart reported 3 hints:
line 200 col 45: Avoid using braces in interpolation when not needed.
line 208 col 56: Avoid using braces in interpolation when not needed.
line 208 col 77: Avoid using braces in interpolation when not needed.
flutter format to format
Maintenance issues and suggestions
Homepage URL isn't helpful. (-10 points)
homepage field from
pubspec.yaml: link to a website about the package or use the source repository URL.
The package description is too short. (-20 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.