JsonRpcRequest<T> constructor

const JsonRpcRequest<T>(
  1. Enum method, {
  2. T? params,
  3. int? id,
})

Creates a JSON-RPC request to invoke method with params.

{
  'jsonrpc': '2.0',
  'id': [id],
  'method': [method],
  'params': [params],
}

Implementation

const JsonRpcRequest(
  this.method, {
  this.params,
  this.id,
}): assert(id == null || id >= 0);