sendMessage method
Implementation
void sendMessage(String message) {
debugPrint("sendMessage");
if (stompClient == null) {
debugPrint("stompClient is null");
return;
}
if (!stompClient!.connected) {
debugPrint("stompClient is not connected");
return;
}
stompClient?.send(
destination: '/app/$transformedTopic',
// body: json.encode({'a': 123}),
body: message,
);
}