Skip to content
pubscout

ndef

0.4.0, released a year ago by nfc.im

A Dart library to decode and encode NFC Data Exchange Format (NDEF) records.

WASM-ready
$ flutter pub add ndef
Source repository

What it does

Decodes and encodes various types of NDEF records such as NFC Well-known, Media, Absolute URI, and External records. Provides support for data-binding by implementing payloads as dynamic getters and setters.

AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to handle NFC Data Exchange Format (NDEF) records in a Dart or Flutter application.
  • You are parsing or building NFC messages like text, URIs, smart posters, or Bluetooth pairing data.

Skip it when

  • You are looking for higher-level NFC platform bindings for reading/writing tags (this package only handles NDEF encoding/decoding).

Strengths

  • Supports multiple NDEF record types (TNF 1 through TNF 4).
  • Provides extension methods for seamless encoding and decoding.

Weaknesses

  • Under active development and subject to breaking API changes.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

not documented

import 'package:ndef/ndef.dart' as ndef;

var uriRecord = new ndef.UriRecord.fromString("https://github.com/nfcim/ndef");
var textRecord = new ndef.TextRecord(text: "Hello");
var encodedUriRecord = uriRecord.encode().toHexString();

Alternatives

Packages that do the same job and could replace ndef.

Works with

Packages commonly used together with ndef: ones it builds on, ones built on it, and its own family.