js_bridge 1.0.4
js_bridge: ^1.0.4 copied to clipboard
Provides a simple means of registering Dart functions that you want to make available to your Javascript code. It takes care of most of the tedious Javascript/Dart type mapping that is necessary to ma [...]
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add js_bridge
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
js_bridge: ^1.0.4
Alternatively, your editor might support dart pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:js_bridge/js_bridge.dart';