Skip to content

Flutter plugin to provide NFC functionality on Android and iOS, including reading metadata, read & write NDEF records, and transceive layer 3 & 4 data with NFC tags / cards

License

Notifications You must be signed in to change notification settings

larssn/flutter_nfc_kit

 
 

Repository files navigation

Flutter NFC Kit

pub version Build Example App

Yet another plugin to provide NFC functionality on Android, iOS and browsers (by WebUSB, see below).

This plugin's functionalities include:

  • read metadata and read & write NDEF records of tags / cards complying with:
    • ISO 14443 Type A & Type B (NFC-A / NFC-B / MIFARE Classic / MIFARE Plus / MIFARE Ultralight / MIFARE DESFire)
    • ISO 18092 (NFC-F / FeliCa)
    • ISO 15963 (NFC-V)
  • R/W block / page / sector level data of tags complying with:
    • MIFARE Classic / Ultralight (Android only)
    • ISO 15693 (iOS only)
  • transceive raw commands with tags / cards complying with:
    • ISO 7816 Smart Cards (layer 4, in APDUs)
    • other device-supported technologies (layer 3, in raw commands, see documentation for platform-specific supportability)

Note that due to API limitations, not all operations are supported on all platforms. You are welcome to submit PRs to add support for any standard-specific operations.

This library uses ndef for NDEF record encoding & decoding.

Setup

Thank nfc_manager plugin for these instructions.

Android

iOS

Web

The web version of this plugin does not actually support NFC in browsers, but uses a specific WebUSB protocol, so that Flutter programs can communicate with dual-interface (NFC / USB) devices in a platform-independent way.

Make sure you understand the statement above and the protocol before using this plugin.

Usage

We provide simple code example and a example application.

Refer to the documentation for more information.

Error codes

We use error codes with similar meaning as HTTP status code. Brief explanation and error cause in string (if available) will also be returned when an error occurs.

About

Flutter plugin to provide NFC functionality on Android and iOS, including reading metadata, read & write NDEF records, and transceive layer 3 & 4 data with NFC tags / cards

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 45.8%
  • Kotlin 26.9%
  • Swift 23.4%
  • Ruby 2.0%
  • HTML 1.3%
  • Objective-C 0.6%