unsubscribe method
Unsubscribe from the topic.
Implementation
Future<void> unsubscribe() async {
if (subscribeId != null) {
// Send the request and reset the subscription variables.
await safeSend(Request(
op: 'unsubscribe',
id: subscribeId,
topic: name,
));
// await ros.requestUnsubscribe(id);
subscription = null;
subscribeId = null;
}
}