Flutter / Dart target
Generated code uses only the officially supported Dart↔Java interop path: package:jni (the runtime used by jnigen). There is no MethodChannel in the generated API surface. package:jni_flutter is used only by apps to obtain the application Context / current Activity.
- Each Java type → Dart extension type over
JObject(zero-cost, tree-shakable, no registry). - Strict-native mode (default) keeps JNI types visible (
JString,JIntArray);ergonomic-dartmapsStringto DartStringwith automatic conversion/release. - Lifecycle, callbacks and threading: see
docs/architecture/lifecycle.md. - iOS: Dart bindings over
package:objective_c; seedocs/ios/README.md.
Runtime dependencies (pub.dev):
dependencies:
jni: ^1.0.3
jni_flutter: ^1.0.3
objective_c: 9.5.0
native_api_runtime: ^0.1.0-beta.1
native_api_ui: ^0.1.0-beta.1 # optional: native views
Source:
docs/flutter/README.md