BridgeResponse class
A JSON-RPC 2.0 response on the bridge.
Constructors
- BridgeResponse({required String id, dynamic result, BridgeError? error})
-
const
- BridgeResponse.error(String id, BridgeError error)
-
Create an error response.
factory
-
BridgeResponse.fromJson(Map<
String, dynamic> json) -
factory
- BridgeResponse.success(String id, [dynamic result])
-
Create a success response.
factory
Properties
- error → BridgeError?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
- isError → bool
-
Whether this response indicates failure.
no setter
- isSuccess → bool
-
Whether this response indicates success.
no setter
- result → dynamic
-
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, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited