RpcResponse class

Inheritance

Constructors

RpcResponse({required RequestId? id, Object? result, RpcError? error})
Constructs a JSON-RPC response.
const
RpcResponse.fromJson(Map<String, Object?> json)
factory
RpcResponse.withExplicitNullResult({required RequestId? id})
A response that explicitly carries "result": null.
const

Properties

error → RpcError?
The error (null when this is a success response).
final
hashCode → int
The hash code for this object.
no setterinherited
id → Object?
The request identifier this response resolves.
final
isError → bool
Whether this response carries an error.
no setter
result → Object?
The successful result.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
Serializes the message to a JSON map.
override
toLine() → String
Serializes to a newline-delimited JSON string.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

version → const String