getBulkVersion method

Future<String?> getBulkVersion({
  1. required TransferType txType,
  2. String? destination,
})

Implementation

Future<String?> getBulkVersion({
  required TransferType txType,
  String? destination,
}) async {
  final version = await sendCommand<BulkVersionReply>(
    BulkVersionBleCommandTx(
      txType: txType,
      destination: destination,
    ),
  );

  if (version == null || version.hasErrors) {
    return null;
  }

  final versionString = version.version.trim();
  if (versionString.isEmpty) {
    return null;
  }

  return versionString;
}