Connection class final

Represents a connection between two peers in a Ditto mesh network.

Annotations
  • @JsonSerializable.new(fieldRename: FieldRename.none)
  • @immutable
  • @external

Constructors

Connection({required String id, required String peerKeyString1, required String peerKeyString2, required ConnectionType connectionType, required double? approximateDistanceInMeters})
const
Connection.fromJson(Map<String, dynamic> json)
factory

Properties

approximateDistanceInMeters double?
Estimate of distance to the remote peer.
final
connectionType ConnectionType
Type of transport enabling this connection.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for the connection.
final
peerKeyString1 String
The peer key of the peer at one end of the connection, as a string.
final
peerKeyString2 String
The peer key of the peer at the other end of the connection, as a string.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
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.
inherited

Operators

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