Most Flutter NFC tutorials stop at "write a URL". When I built the encoding layer for an NFC app, I needed eleven record types, exact byte counts before writing, and records that every phone would read. Packages like nfc_manager give you the session and the tag; building the right bytes is still up to you.
This post walks through four record types — URI, text, vCard and Wi-Fi — at the byte level, with the Dart I ended up with.
A 30-second NDEF refresher
An NDEF message is a list of records. Each record has:
a TNF (Type Name Format): well-known (NFC Forum types like U and T ), media (a MIME type), external , and so on
a type (e.g. U , or text/vcard )
an optional ID
a payload
With ndef_record / nfc_manager_ndef , building one looks like this:
ndef . NdefRecord ( typeNameFormat: ndef . TypeNameFormat . wellKnown , type: Uint8List .…