call<R extends Serializable, T> method
Future<T>
call<
R extends Serializable, T>({ - required String method,
- required R params,
- T onDecode(
- Map
)?,
})
Implementation
@override
Future<T> call<R extends Serializable, T>(
{required String method,
required R params,
T Function(Map)? onDecode}) async {
var response = await _client.call(method, params.toJSON());
LogManager.getInstance
.debug('Response from RPC is : ${response.toString()}');
if (onDecode != null) {
return onDecode(response);
}
return response;
}