PeerClient class abstract interface

Client side of a 1:1 BLE peer session (discovers hosts and connects).

Implemented types
Implementers
Available extensions

Properties

connectionStream → Stream<PeerConnectionInfo?>
no setter
hashCode → int
The hash code for this object.
no setterinherited
jsonMessages → Stream<Map<String, dynamic>>

Available on PeerSessionMessaging, provided by the PeerSessionMessagingX extension

Incoming application JSON payloads (excludes session handshake and text).
no setter
localEndpoint → PeerEndpoint?
no setterinherited
messagesStream → Stream<PeerMessage>
no setteroverride
nearbyHostsStream → Stream<List<PeerNearby>>
Nearby hosts found during scanning.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textMessages → Stream<String>

Available on PeerSessionMessaging, provided by the PeerSessionMessagingX extension

Incoming plain-text chat messages (PeerMessageTypes.appText).
no setter

Methods

cancelPendingConnection() → Future<void>
Aborts an in-flight GATT connect / unanswered invite. Idempotent.
connect(Device device) → Future<void>
Connects using a raw Device (advanced).
disconnect() → Future<void>
invite(PeerNearby host) → Future<void>
Connects and sends a session invite to host.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshDiscovery() → Future<void>
send(PeerMessage message) → Future<void>
override
sendJson(String type, [Map<String, dynamic>? payload]) → Future<void>

Available on PeerSessionMessaging, provided by the PeerSessionMessagingX extension

Sends a typed application payload using the stored local endpoint.
sendText(String text) → Future<void>

Available on PeerSessionMessaging, provided by the PeerSessionMessagingX extension

Sends a plain-text message using the stored local endpoint.
startDiscovery({required PeerUser localUser}) → Future<void>
Starts scanning for nearby hosts.
startDiscoveryWithEndpoint({required PeerEndpoint localPeer}) → Future<void>
Starts scanning using a pre-built PeerEndpoint (advanced).
stopDiscovery() → Future<void>
toString() → String
A string representation of this object.
inherited

Operators

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