PeerId class

PeerId implementation for CRDT

A PeerId uniquely identifies a peer in the CRDT network. It is used to distinguish between different peers when merging changes.

Implemented types

Constructors

PeerId.empty()
Create an empty PeerId
factory
PeerId.fromUint8List(Uint8List bytes, {int offset = 0})
Decodes a PeerId from a 16-byte buffer.
factory
PeerId.generate()
Generates a random PeerId
factory
PeerId.parse(String value)
Parses a PeerId from a string
factory

Properties

hashCode → int
Returns a hash code for this PeerId
no setteroverride
id → String
The unique identifier string
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(PeerId other) → int
Compares this PeerId with another PeerId
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
Returns a string representation of this PeerId
override
toUint8List() → Uint8List
Encodes this PeerId into a new 16-byte buffer.

Operators

operator ==(Object other) → bool
Compares two PeerIds for equality
override