transmit method Null safety
- Message msg
override
transmit places the message on the wire immediately
Implementation
Future<bool> transmit(Message msg) async {
if (_characteristic == null) {
throw Exception("Not connected");
}
List<int> data = msg.encode();
print("Sending: ${Helper.toHex(data)}");
await _characteristic!.write(data);
return true;
}