Cluster class
Cluster
- Inheritance
-
- Object
- Serializable
- Cluster
- Annotations
-
- @JsonSerializable()
Constructors
- Cluster.new(Uri uri)
-
The RPC URL of a cluster.
const
-
Cluster.fromJson(Map<
String, dynamic> json) -
Creates an instance of
this
class from the constructor parameters defined in thejson
object.factory - Cluster.http(String host, {int? port})
-
Creates a
HTTP
RPC URL forhost
.factory - Cluster.https(String host, {int? port})
-
Creates a
HTTPS
RPC URL forhost
.factory - Cluster.ws(String host, {int? port})
-
Creates a
WS
RPC URL forhost
.factory - Cluster.wss(String host, {int? port})
-
Creates a
WSS
RPC URL forhost
.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
The cluster's chain id parsed from the Uri.host.
no setter
- name → String?
-
The cluster's name parsed from the Uri.host.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri → Uri
-
The endpoint.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serialises
this
class into a JSON object.override -
toString(
) → String -
A string representation of this object.
override
-
toWebsocket(
[int? port]) → Cluster -
Creates a new Cluster from
this
for a websocket server.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited