send method
Implementation
@override
void send(int type, [dynamic payload, int? contentType]) {
try {
log.info(
"Sending message ${MessageCode.get(type)} with payload $payload to the outer control");
final _payload = encoding.encode(Payload(contentType, payload));
postMessage([
type,
_payload.header,
_payload.data,
]);
} catch (e, stack) {
print(e);
print(stack);
}
}