This is a support library to access JNI from Dart / Flutter code. This provides the common infrastructure to bindings generated by jnigen, as well as some utility methods.
This library contains:
GlobalJniEnv type which provides a thin abstraction over JNIEnv, so that it can be used from multiple threads.Jni.spawn).JObject class, which provides base class for classes generated by jnigen.JList, JMap, JInteger, ...Apart from being the base library for code generated by jnigen this can also be used for one-off uses of the JNI and debugging. To generate type-safe bindings from Java libraries, use jnigen.
The test/ directory contains files with comments explaining the basics of this module, and the example/ directory contains a flutter example which also touches some Android-specifics.
Using this library assumes some familiarity with JNI - it's threading model and object references, among other things.