getNdefMessage method

Future<NdefMessage?> getNdefMessage()

Implementation

Future<NdefMessage?> getNdefMessage() {
  return hostApi
      .ndefGetNdefMessage(handle: _handle)
      .then(
        (value) => value == null
            ? null
            : NdefMessage(
                records: value.records
                    .map(
                      (r) => NdefRecord(
                        typeNameFormat: TypeNameFormat.values.byName(
                          r.tnf.name,
                        ),
                        type: r.type,
                        identifier: r.id,
                        payload: r.payload,
                      ),
                    )
                    .toList(),
              ),
      );
}