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.
Open Runner.xcworkspace with Xcode and navigate to project settings then the tab Signing & Capabilities.
Select the Runner in targets in left sidebar then press the "+ Capability" in the left upper corner and choose Near Field Communication Tag Reading.
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.
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.
Operation Mode
We provide two operation modes: polling (default) and event streaming. Both can give the same NFCTag object. Please see example for more details.
Performance Optimization (Android)
For Android applications, you can optimize NFC tag detection performance using the androidReaderModeFlags parameter:
// Skip automatic NDEF discovery for ~500ms faster detection// and disable platform sounds for custom feedbackconst flags = 0x80 | 0x100; // FLAG_READER_SKIP_NDEF_CHECK | FLAG_READER_NO_PLATFORM_SOUNDSfinal tag = awaitFlutterNfcKit.poll(
androidReaderModeFlags: flags,
);