RpcResponse class
- Inheritance
-
- Object
- RpcObject
- RpcObjectType
- RpcResponse
Constructors
- RpcResponse({dynamic id, dynamic result, RpcError? error})
-
const
- RpcResponse.fromMeta(RpcMeta meta)
-
Creates a new RpcResponse from
meta
factory
Properties
- error → RpcError?
-
final
- hasError → bool
-
Returns true if this response has an error
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasId → bool
-
Is response has an id
no setter
- hasResult → bool
-
Returns true if this response has a result
no setter
- id → dynamic
-
finalinherited
- isIdInt → bool
-
Is id is int
no setter
- isIdString → bool
-
Is id is String
no setter
- result → dynamic
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
encode(
{String postfix = '%SEP%'}) → List< int> -
Encodes RpcObject to bytes list
inherited
-
handle(
{ResponseResultHandler? onResult, ResponseErrorHandler? onError}) → void -
Easy handling for the current RpcResponse
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMeta(
) → RpcMeta -
Returns RpcMeta of the current RpcObjectType
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator [](
dynamic key) → dynamic -
get result value by its
key
, if no results returns Null -
operator []=(
dynamic key, dynamic value) → void -
sets result value by its
key
if response contains result object