getHeight static method
getHeight RPC returns the latest block height.
Implementation
static Future<int?> getHeight({RpcConfig? config}) async {
try {
return await _methodChannel.invokeMethod('getHeight', {
'seedRpc': config?.seedRPCServerAddr?.isNotEmpty == true
? config?.seedRPCServerAddr
: [DEFAULT_SEED_RPC_SERVER],
});
} catch (e) {
rethrow;
}
}