txRu method

Future<Uint8List?> txRu(
  1. NfcTag tag,
  2. Uint8List dataPayload
)

Implementation

Future<Uint8List?> txRu(NfcTag tag, Uint8List dataPayload) async {
  Uint8List payload = Uint8List.fromList([0xB1] + dataPayload);

  Uint8List? receive = await Sic431XCore.instance.sendCommand(tag, payload);

  if (receive!.isNotEmpty) {
    return receive;
  } else {
    if (Platform.isIOS) {
      NfcManager.instance
          .stopSession(errorMessage: 'Read Register error !!!');
    }
    return Uint8List(0);
  }
}