decode<S, T> static method

JsonRpcResponseContext<T> decode<S, T>(
  1. Map<String, dynamic> response,
  2. JsonRpcResponseDecoder<S, T> decoder
)

Decodes a response context.

Implementation

static JsonRpcResponseContext<T> decode<S, T>(
  final Map<String, dynamic> response,
  final JsonRpcResponseDecoder<S, T> decoder,
) {
  return JsonRpcResponseContext<T>(
    context: JsonRpcContext.fromJson(response[contextKey]),
    value: decoder(response[valueKey]),
  );
}