flutter_nfc_kit 0.0.7 copy "flutter_nfc_kit: ^0.0.7" to clipboard
flutter_nfc_kit: ^0.0.7 copied to clipboard

outdated

Plugin to provide NFC functionality on Android and iOS, including reading metadata and transceive APDU with NFC tags / cards

Flutter NFC Kit #

pub version

Yet another plugin to provide NFC functionality on Android and iOS.

This plugin supports:

  • read metadata of tags / cards complying with:
    • ISO 14443-4 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)
    • China ID Card (non-standard, GUID only)
  • transceive APDU with smart cards complying with ISO 7816

Note that due to API limitations not all operations are supported on both platforms.

Setup #

Thank nfc_manager plugin for these instructions.

Android #

iOS #

Usage #

Simple example:

import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';

var availability = await FlutterNfcKit.nfcAvailability;
if (availability != NFCAvailability.available) {
    // oh-no
}

var tag = await FlutterNfcKit.poll();
print(jsonEncode(tag));
if (tag.type == NFCTagType.iso7816) {
    var result = await FlutterNfcKit.transceive("00B0950000");
    print(result);
}
await FlutterNfcKit.finish();

A more complicated example can be seen in example dir.

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.

183
likes
40
pub points
96%
popularity

Publisher

verified publishernfc.im

Plugin to provide NFC functionality on Android and iOS, including reading metadata and transceive APDU with NFC tags / cards

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, json_annotation

More

Packages that depend on flutter_nfc_kit