getSubscription static method
getSubscription RPC gets the subscription details of a subscriber in a topic.
Implementation
static Future<Map<String, dynamic>?> getSubscription(
String topic, String subscriber,
{RpcConfig? config}) async {
try {
Map? resp = await _methodChannel.invokeMethod('getSubscription', {
'topic': topic,
'subscriber': subscriber,
'seedRpc': config?.seedRPCServerAddr?.isNotEmpty == true
? config?.seedRPCServerAddr
: [DEFAULT_SEED_RPC_SERVER],
});
if (resp == null) {
return null;
}
return Map<String, dynamic>.from(resp);
} catch (e) {
rethrow;
}
}