read method

Future<NdefMessage?> read()

Reads the message currently on the tag.

Returns null when the tag holds none. Both platforms report an empty tag this way, so treat it as "nothing written yet" rather than a failure.

Implementation

Future<NdefMessage?> read() async {
  final message = await nfcApi.ndefRead(_handle);
  return message == null ? null : ndefMessageFromWire(message);
}