ndef_kit 0.1.0 copy "ndef_kit: ^0.1.0" to clipboard
ndef_kit: ^0.1.0 copied to clipboard

Reusable NDEF read, write, verification, diagnostics, and session lifecycle APIs for Flutter apps.

example/ndef_kit_example.dart

import 'package:ndef_kit/ndef_kit.dart';

Future<NdefTagResult> readTag() {
  return NdefClient.instance.read(
    options: const NdefSessionOptions(
      alertMessageIos: 'Hold your iPhone near an NDEF tag.',
      successMessageIos: 'Read complete',
    ),
  );
}

Future<NdefTagResult> writeText(String text) {
  final message = NdefMessageData(
    records: [NdefRecordData.text(text, languageCode: 'en')],
  );
  return NdefClient.instance.write(
    message,
    verifyAfterWrite: true,
    options: const NdefSessionOptions(
      alertMessageIos: 'Hold your iPhone near the tag to write.',
      successMessageIos: 'Write verified',
    ),
  );
}
1
likes
150
points
314
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Reusable NDEF read, write, verification, diagnostics, and session lifecycle APIs for Flutter apps.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter, nfc_manager, nfc_manager_ndef

More

Packages that depend on ndef_kit