JsonRpcHttpClient constructor

JsonRpcHttpClient({
  1. Client? client,
  2. required dynamic endpoint,
  3. ErrorDecoder? errorDecoder,
  4. RpcExceptionDecoder? rpcExceptionDecoder,
  5. bool? omitRequestId,
  6. bool? omitRpcVersion,
})

Implementation

JsonRpcHttpClient({
  Client? client,
  required /* String | Uri */ endpoint,
  ErrorDecoder? errorDecoder,
  RpcExceptionDecoder? rpcExceptionDecoder,
  bool? omitRequestId,
  bool? omitRpcVersion,
})  : _client = client ?? Client(),
      _endpoint = endpoint is Uri ? endpoint : Uri.parse(endpoint.toString()),
      _errorDecoder = errorDecoder,
      _rpcExceptionDecoder = rpcExceptionDecoder ?? RpcExceptionDecoder(),
      _omitRequestId = omitRequestId ?? false,
      _omitRpcVersion = omitRpcVersion ?? false;