JsonRpcResponse<T> class

Annotations
  • @Freezed(genericArgumentFactories: true)

Constructors

JsonRpcResponse({required int id, @Default('2.0') String jsonrpc, JsonRpcError? error, T? result})
const
factory
JsonRpcResponse.fromJson(Map<String, dynamic> json)
factory

Properties

copyWith → $JsonRpcResponseCopyWith<T, JsonRpcResponse<T>>
Create a copy of JsonRpcResponse with the given fields replaced by the non-null parameter values.
no setterinherited
error JsonRpcError?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id int
no setterinherited
jsonrpc String
no setterinherited
result → T?
no setterinherited
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(Object? toJsonT(T)) Map<String, dynamic>
Serializes this JsonRpcResponse to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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