setPrefixFromString method

Future<CommandResponse> setPrefixFromString({
  1. required dynamic deviceId,
  2. required String prefix,
  3. FormattableSymbology symbology = FormattableSymbology.allCodes,
})

Sets the prefix formatting using a string.

deviceId - The identifier of the target device. prefix - A string to be used as the prefix, with a maximum length of 4.

Returns a CommandResponse indicating the success or failure of the operation.

Implementation

Future<CommandResponse> setPrefixFromString(
    {required deviceId,
    required String prefix,
    FormattableSymbology symbology = FormattableSymbology.allCodes}) async {
  final directInputKeysCodes =
      _getDirectInputKeysCodesFromString(prefix, _maxPrefixChars);
  return sendCommand(deviceId, _prefixSymbologyCodesMap[symbology]!,
      parameters: directInputKeysCodes);
}