transmitString static method
It transmits an infrared pattern, return a String "Emitting" if there was no problem in the process.
This method receives a String
The value pattern
has to be a string that contains the behavior in HEX
, example:
TV_POWER_HEX = "0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e"
;
Implementation
static Future<String> transmitString({required String pattern}) async {
debugPrint("Send code for Emitter: $pattern");
final String result = await _channel
.invokeMethod('codeForEmitter', {"codeForEmitter": pattern});
return result;
}