GitHub repositoryokadan/flutter-nfc-manager

flutter-nfc-manager

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

flutter-nfc-manager project cover
Stars
250
Forks
217
Last push (UTC)
Apr 3, 2026
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

nfc_manager

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

Setup

Android
iOS

Usage

Handling the Session
import 'package:nfc_manager/nfc_manager.dart';

// Check the availability of NFC on the current device.
NfcAvailability availability = await NfcManager.instance.checkAvailability();

if (availability != NfcAvailability.enabled) {
  print('NFC may not be supported or may be temporarily disabled.');
  return;
}

// Start the session.
NfcManager.instance.startSession(
  pollingOptions: {NfcPollingOption.iso14443}, // You can also specify iso18092 and iso15693.
  onDiscovered: (NfcTag tag) async {
    // Do something with an NfcTag instance...
    print(tag);

    // Stop the session when no longer needed.
    await NfcManager.instance.stopSession();
  },
);
Working with NfcTag

An NfcTag instance is typically not used directly. Instead, convert it to a platform-specific tag class by calling that class's static method from.

import 'package:nfc_manager/nfc_manager.dart';
import 'package:nfc_manager_ndef/nfc_manager_ndef.dart';

final Ndef ndef = Ndef.from(tag);

if (ndef == null) {
  print('This tag is not compatible with NDEF.');
  return;
}

// Do something with an Ndef instance...
print(ndef);

The following platform-specific tag classes are available:

Android only
  • NfcAAndroid
  • NfcBAndroid
  • NfcFAndroid
  • NfcVAndroid
  • IsoDepAndroid
  • MifareClassicAndroid
  • MifareUltralightAndroid
  • NfcBarcodeAndroid
  • NdefAndroid
  • NdefFormatableAndroid
iOS only
  • FeliCaIos
  • MiFareIos
  • Iso15693Ios
  • Iso7816Ios
  • NdefIos
Cross-platform abstractions (separate packages)
okadan GitHub avatar
GitHub author

okadan ↗

LanguagesDartSwiftKotlinRubyObjective-C

Categories

Packages published by this repository

Dependencies used

Dependency list 5 items

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗