nfc_antenna_info_flutter 1.0.1

SDKflutter
Platformandroid

Flutter plugin for retrieving precise NFC antenna information to accurately locate NFC chips on devices.

nfc_antenna_info_flutter

pub package nfc_antenna_info_flutter coverage style: very good analysis License: BSD-3-Clause

A Flutter plugin for retrieving precise NFC antenna information to accurately locate NFC chips on Android 14 and newer devices.

This plugin is ideal for Flutter developers building apps that depend on accurate NFC interactions—such as contactless payments, access control, or device pairing. By providing detailed NFC antenna location data on supported Android devices (Android 14+), it helps ensure optimal alignment between devices, leading to a smoother user experience and fewer failed NFC reads or connections.

It's especially useful for apps in retail, logistics, IoT, and any domain where NFC precision directly impacts performance.

Features

Provides a straightforward API to gather detailed information about all available NFC antennas on Android devices. It also delivers device-specific details relevant to the positioning of antennas.

Platform support

AndroidiOS
SupportSDK 34+❌

Requirements

  • Flutter >=3.24.0
  • Dart >=3.5.0
  • Android compileSDK 34
  • Java 17
  • Android Gradle Plugin >=8.2.0
  • Gradle wrapper >=8.3

Public methods

Return TypeMethod NameDescriptionThrows
Future<NfcAntennaResponse>getNfcAntennaInfoGets the NFC antenna information.- UnsupportedFeatureException if the platform does not support feature.
- NfcUnavailableException if NFC is not available on the device.
- NfcDisabledException if NFC is disabled on the device.

Parameters of the NfcAntennaResponse:

TypeParameter NameDescription
intdeviceWidthWidth of the device in millimeters.
intdeviceHeightHeight of the device in millimeters.
booldeviceFoldableWhether the device is foldable.
List<NfcAntenna>availableNfcAntennasAll available Nfc Antennas on the device.

Parameters of the NfcAntenna:

TypeParameter NameDescription
intlocationXLocation of the antenna on the X axis in millimeters. 0 is the top-left when the user is facing the screen and the device orientation is Portrait.
intlocationYLocation of the antenna on the Y axis in millimeters. 0 is the top-left when the user is facing the screen and the device orientation is Portrait.

Example

More examples can be found in /example folder on GitHub.

Feature requests and bugs

Please file feature requests and bugs at the issue tracker.

Maintainers