NodeResponse class final

Node → hub: the result of a NodeRequest.

Inheritance
Annotations
  • @immutable

Constructors

NodeResponse(String requestId, {bool ok = true, Map<String, dynamic> payload = const {}, String? error})
Creates a node response.
const
NodeResponse.failure(String requestId, String error)
A failed response with error.
factory

Properties

error String?
The error message (on failure).
final
hashCode int
The hash code for this object.
no setterinherited
ok bool
Whether the action succeeded.
final
payload Map<String, dynamic>
The response payload (on success).
final
requestId String
The correlation id from the originating NodeRequest.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The wire type discriminator (the t envelope field).
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
The message body (without the t discriminator).
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) NodeResponse
Decodes from json.

Constants

typeName → const String