Giter Club home page Giter Club logo

flutter_nfc_kit's Introduction

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.

flutter_nfc_kit's People

Contributors

harry-chen avatar jiegec avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.