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
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:
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,
);