flutter_bridge_webview 0.1.40

  • Readme
  • Changelog
  • Example
  • Installing
  • 58

BridgeWebView for Flutter (Developers Preview) #

pub package

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

On iOS the WebView widget is backed by a WKWebViewJavascriptBridge; On Android the WebView widget is backed by a WebView.

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.

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.

0.1.38 #

  • added the callback of page finished.

0.1.35 #

  • added iOS webview support.

0.1.33 #

  • fixed the android webview layout style.

0.1.31 #

  • added customized WebChromeClient.

0.1.30 #

  • fix bugs.

0.1.25 #

  • add a new channel method.

0.1.24 #

  • change the bridge callback to future.

0.1.21 #

  • added a new channel registerBridgeChannels.

0.1.8 #

  • debug webview to load loacal url.

0.1.0 #

  • changed the implementation of bridge webview.

0.0.33 #

  • add the return value of onBridgeHandler.

0.0.32 #

  • set the default value of the prop hidden.

0.0.31 #

  • added the methods show and hide.

0.0.30 #

  • change to single child widget.

0.0.29 #

  • test factory mode.

0.0.26 #

  • added some logs to debug the factory mode.

0.0.25 #

  • remove the webview id in android.

0.0.24 #

  • remove the id.

0.0.22 #

  • add a factory plugin class.

0.0.21 #

  • Fixed the bug of json string.

0.0.20 #

  • added the json encode.

0.0.19 #

  • change the arguments of the method callHandler to json string.

0.0.17 #

  • change the arguments to the type list.

0.0.16 #

  • added some debug logs.

0.0.15 #

  • added register handler callback.

0.0.14 #

  • added register handler.

0.0.13 #

  • added some logs.

0.0.12 #

  • fixed the test codes.

0.0.11 #

  • fixed the test codes.

0.0.10 #

  • override the method onPageFinished.

0.0.9 #

  • remove the navigation delegate.

0.0.8 #

  • change the arguments type of the method callHandler.

0.0.6 #

  • remove url check.

0.0.4 #

  • add arguments for the method callHandler.

0.0.3 #

  • add the method registerHandler.

0.0.1 #

  • Initial release.

example/README.md

flutter_js_bridge_example #

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:

with Flutter:


$ 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:


import 'package:flutter_bridge_webview/flutter_bridge_webview.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
58
Learn more about scoring.

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

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/flutter_bridge_webview.dart. (-1.49 points)

Analysis of 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.

Format lib/generated/i18n.dart.

Run flutter format to format lib/generated/i18n.dart.

Maintenance issues and suggestions

Homepage URL isn't helpful. (-10 points)

Update the 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test