java_interop 1.2.0
java_interop: ^1.2.0 copied to clipboard
Call Java from pure Dart over JNI, using only dart:ffi and no Flutter SDK. Boots or attaches to a JVM in-process, loads jars, and calls constructors, methods, fields and arrays.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add java_interopWith Flutter:
$ flutter pub add java_interopThis will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
dependencies:
java_interop: ^1.2.0Alternatively, your editor might support dart pub get or flutter pub get. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:java_interop/java_interop.dart';