Skip to content
pubscout

jni_flutter

1.1.0, released yesterday by dart.dev

Access Flutter Android APIs from Dart.

Rock solid
$ flutter pub add jni_flutter
Source repository

What it does

Provides Dart bindings to Android-specific Flutter APIs such as application context and activity. It is a lightweight plugin that wraps the native Java/Kotlin code.

AI-written summary of version 1.0.4+1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Need Android application context in Dart
  • Need to obtain the Flutter activity from Dart
  • Working on an Android-only Flutter app

Skip it when

  • Targeting iOS or web
  • Using non-Android platform APIs

Strengths

  • Simple API surface
  • No code generation required
  • Stable, well-maintained

Weaknesses

  • Android-only
  • No support for iOS or web
  • Requires plugin integration

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

Add "jni_flutter" to pubspec dependencies and run flutter pub get. No additional native configuration needed.

import 'package:jni_flutter/jni_flutter.dart';

final context = AndroidApplicationContext();
final activity = AndroidActivity();

Alternatives

Packages that do the same job and could replace jni_flutter.

  • quill_native_bridge

    An internal plugin for flutter_quill to access platform-specific clipboard and gallery APIs

  • location

    Flutter plugin to get real-time device location across platforms.

  • nfc_manager

    A Flutter plugin providing access to NFC features on Android and iOS.

  • system_info2

    Provides easy access to system information like architecture, kernel, memory, OS, CPU, and user.

Works with

Packages commonly used together with jni_flutter: ones it builds on, ones built on it, and its own family.