패키지, 저장소 및 앱 카테고리 검색

패키지 상세v3.7.0

flutter_nfc_kit

Android, iOS 및 웹에서 NFC 기능을 제공하며, 메타데이터 읽기, NDEF 레코드 읽기 및 쓰기, NFC 태그/카드와의 레이어 3 및 레이어 4 데이터 전송을 포함합니다

AndroidiOSWeb
30일 다운로드
8.6만
좋아요
280
Pub 점수
160

패키지 설치

flutter pub add flutter_nfc_kit

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

flutter_nfc_kit은 Android, iOS 및 웹에서 NFC 기능을 가능하게 하는 크로스 플랫폼 플러터 패키지입니다. 개발자는 NDEF 레코드를 읽고 쓰며, NFC 태그의 메타데이터에 액세스하고, 레이어 3 및 4에서 저수준의 트랜스시브 작업을 수행할 수 있습니다. 이 패키지는 비접촉 데이터 교환, 스마트 태그 상호작용, NFC 카드와의 안전한 통신과 같은 다양한 NFC 사용 사례를 지원합니다. 플랫폼 간 일관된 API를 제공하여 플러터 애플리케이션에 NFC 기능을 쉽게 통합할 수 있도록 합니다.

사용 사례

  • NDEF 레코드 읽기 및 쓰기
  • NFC 태그 메타데이터에 액세스
  • 저수준 NFC 통신 수행 중
  • 비접촉 결제 또는 티켓팅 앱 구축
  • 스마트 포스터 상호작용 활성화
  • NFC 기능을 갖춘 사물인터넷 장치와의 통합

주요 기능

  • 크로스 플랫폼 지원 (Android, iOS, Web)
  • NDEF 레코드 읽기 및 쓰기
  • NFC 태그에서 메타데이터 추출
  • 레이어 3 및 4 전수 기능
  • 플랫폼 간 일관된 API
  • 실시간 NFC 태그 감지

적합한 대상

  • NFC 기반 모바일 앱을 개발하는 개발자
  • 접촉 없는 데이터 전송이 필요한 응용 프로그램
  • 스마트 기기 상호작용 시스템
  • 이벤트 티켓팅 및 접근 제어 솔루션
  • 사물인터넷 및 임베디드 시스템 통합

고려 사항

  • NFC 하드웨어를 갖춘 장치가 필요합니다
  • 권한은 각 플랫폼에서 처리해야 합니다
  • 웹 지원은 호환 브라우저에 한정됩니다
  • iOS는 백그라운드 모드 구성이 필요합니다
  • 성능은 기기 및 태그 유형에 따라 달라질 수 있습니다
  • 고급 NFC 프로토콜에 대한 제한된 지원

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Flutter NFC Kit

pub version Test 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 15693 (NFC-V)
  • R/W block / page / sector level data of tags complying with:
    • MIFARE Classic / Ultralight (Android only, MIFARE Classic Read & Write block for iOS)
    • 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.

Contributing

Please refer to CONTRIBUTING.md for more information.

Setup

Android

We have the following minimum version requirements for Android plugin:

  • Java 17
  • Gradle 8.9
  • Android SDK 24 (you must set corresponding jvmTarget in you app's build.gradle)
  • Android Gradle Plugin 8.7

To use this plugin on Android, you also need to:

iOS

This plugin now supports Swift package manager, and requires iOS 13+.

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.

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 feedback
const flags = 0x80 | 0x100; // FLAG_READER_SKIP_NDEF_CHECK | FLAG_READER_NO_PLATFORM_SOUNDS

final tag = await FlutterNfcKit.poll(
  androidReaderModeFlags: flags,
);

Common flags from NfcAdapter:

  • 0x80 - FLAG_READER_SKIP_NDEF_CHECK: Skip automatic NDEF discovery, improving detection speed by ~500ms
  • 0x100 - FLAG_READER_NO_PLATFORM_SOUNDS: Disable system beep/vibration for custom audio/haptic feedback

These flags are particularly useful for applications that:

  • Need fast tag detection (e.g., access control, fast payments)
  • Implement custom user feedback instead of system sounds
  • Use custom NDEF reading logic instead of automatic discovery

카테고리

의존성

의존성 목록 6 개

소스 저장소

이 패키지를 사용하는 프로젝트