native_device_kit 0.0.2 copy "native_device_kit: ^0.0.2" to clipboard
native_device_kit: ^0.0.2 copied to clipboard

A production-grade Flutter plugin for unified access to Bluetooth, NFC, USB, and native hardware features.

Native Device Kit #

Unified Native Hardware Access for Flutter

Native Device Kit is a production-grade Flutter plugin that provides a high-performance, unified API to access native hardware and system-level features on Android and iOS. It abstracts complex platform-specific implementations written in Kotlin and Swift into clean, consistent, and strongly typed Dart APIs, enabling rapid development without sacrificing performance or platform control.

Designed for enterprise, IoT, fintech, healthcare, and industrial applications.


Overview #

Flutter does not provide direct access to many low-level device capabilities such as Bluetooth, NFC, USB communication, and proprietary hardware SDKs. Native Device Kit bridges this gap by exposing powerful native APIs in a developer-friendly Dart interface.

It enables:

  • Native Bluetooth communication
  • NFC tag reading and writing
  • USB host and external accessory communication
  • Dynamic invocation of third-party native SDKs

All through a single unified plugin interface.


Key Features #

Bluetooth (BLE) #

  • Device scanning
  • Device connection and disconnection
  • Service discovery
  • Event streaming
  • Background scanning support (platform dependent)

NFC #

  • NDEF tag reading
  • NDEF tag writing
  • Background tag discovery
  • Session-based NFC handling

USB Communication #

  • USB device enumeration
  • Device connection management
  • Android USB Host support
  • iOS External Accessory support (MFi devices)

Hardware Bridge #

  • Dynamically invoke any native SDK method
  • Integrate third-party SDKs without modifying plugin core
  • Ideal for industrial SDKs, scanners, printers, payment terminals, biometric devices

Platform Support #

Platform Minimum Version
Android API 23+ (6.0)
iOS 12.0+

Installation #

Add the dependency in your pubspec.yaml:

dependencies:
  native_device_kit: ^1.0.0

Then run:

flutter pub get

Platform Configuration #

Android #

Add required permissions in android/app/src/main/AndroidManifest.xml:

<manifest ...>

    <!-- Bluetooth -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
    <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <!-- NFC -->
    <uses-permission android:name="android.permission.NFC" />
    <uses-feature
        android:name="android.hardware.nfc"
        android:required="false" />

    <!-- USB -->
    <uses-feature
        android:name="android.hardware.usb.host"
        android:required="false" />

</manifest>

iOS #

Add permission descriptions in ios/Runner/Info.plist:

<dict>

    <key>NSBluetoothAlwaysUsageDescription</key>
    <string>Bluetooth access is required to discover and connect to supported devices.</string>

    <key>NSBluetoothPeripheralUsageDescription</key>
    <string>Bluetooth access is required to connect to supported devices.</string>

    <key>NFCReaderUsageDescription</key>
    <string>NFC access is required to read and write NFC tags.</string>

    <key>UISupportsDocumentBrowser</key>
    <true/>

</dict>

Usage #

The plugin exposes a singleton instance:

final kit = NativeDeviceKit.instance;

Bluetooth Module #

final bluetooth = NativeDeviceKit.instance.bluetooth;

// Listen for scan and connection events
bluetooth.eventStream.listen((event) {
  print("Bluetooth Event: $event");
});

// Start scanning
await bluetooth.scan();

// Connect to a device
await bluetooth.connect("DEVICE_ID");

// Disconnect
await bluetooth.disconnect("DEVICE_ID");

NFC Module #

final nfc = NativeDeviceKit.instance.nfc;

// Listen for discovered tags
nfc.eventStream.listen((event) {
  print("NFC Tag: $event");
});

// Start reading
await nfc.readTag();

// Write data
await nfc.writeTag("Hello from Flutter");

// Stop reading
await nfc.stopReading();

USB Module #

final usb = NativeDeviceKit.instance.usb;

// List connected devices
final devices = await usb.getConnectedDevices();

for (var device in devices) {
  print("USB Device: ${device['deviceName']} (${device['deviceId']})");
}

// Open device
await usb.openDevice("DEVICE_ID");

Hardware Bridge (Advanced Usage) #

This module allows dynamic invocation of native SDK methods, enabling integration of custom hardware SDKs without modifying plugin core.

final bridge = NativeDeviceKit.instance.bridge;

final result = await bridge.invoke(
  "customNativeMethod",
  {"param": "value"},
);

print("Native Result: $result");

Use cases:

  • Barcode scanners
  • Thermal printers
  • Payment terminals
  • Biometric hardware
  • Industrial IoT devices

Architecture Overview #

Flutter Application
        ↓
NativeDeviceKit (Dart API Layer)
        ↓
Platform Channels
   (Method + Event Channels)
        ↓
Android (Kotlin)  → Bluetooth, NFC, USB APIs
iOS (Swift)       → CoreBluetooth, CoreNFC, ExternalAccessory

This layered architecture ensures:

  • Clean API separation
  • Native-level performance
  • Platform-specific optimizations
  • Scalable feature expansion

  • IoT and hardware integration apps
  • Payment and POS terminals
  • Healthcare monitoring systems
  • Industrial automation
  • Warehouse and logistics apps
  • Enterprise mobility solutions

Roadmap #

  • Classic Bluetooth (BR/EDR) support
  • USB bulk transfer APIs
  • Serial communication abstraction
  • Native printer SDK adapters
  • Industrial scanner integrations

License #

MIT License © 2026 Built for high-performance Flutter hardware integration.

1
likes
155
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

A production-grade Flutter plugin for unified access to Bluetooth, NFC, USB, and native hardware features.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on native_device_kit

Packages that implement native_device_kit