setPreambleFromString method
Future<CommandResponse>
setPreambleFromString({
- required dynamic deviceId,
- required String preamble,
Sets the preamble formatting using a string.
deviceId
- The identifier of the target device.
preamble
: A string to be used as the preamble, , with a maximum length of 8.
Returns a CommandResponse indicating the success or failure of the operation.
Implementation
Future<CommandResponse> setPreambleFromString(
{required deviceId, required String preamble}) {
final directInputKeysCodes =
_getDirectInputKeysCodesFromString(preamble, _maxPreambleChars);
return sendCommand(deviceId, preamble, parameters: directInputKeysCodes);
}