nearby_connections library

Classes

ConnectionInfo
ConnectionInfo class
Nearby
The NearbyConnection class
Payload
Bytes may be null if Payload.type is not PayloadType.BYTES File may be null if Payload.type is not PayloadType.FILE
PayloadTransferUpdate
Gives payload status (SUCCESS, FAILURE, IN_PROGRESS) bytes transferred and total bytes

Enums

PayloadStatus
PayloadType
Status
Strategy
P2P_CLUSTER - best for small payloads and multiplayer games

Typedefs

OnConnectionInitiated = void Function(String endpointId, ConnectionInfo connectionInfo)
OnConnectionResult = void Function(String endpointId, Status status)
OnDisconnected = void Function(String endpointId)
OnEndpointFound = void Function(String endpointId, String endpointName, String serviceId)
OnEndpointLost = void Function(String? endpointId)
OnPayloadReceived = void Function(String endpointId, Payload payload)
For Bytes, this contains the bytes data
OnPayloadTransferUpdate = void Function(String endpointId, PayloadTransferUpdate payloadTransferUpdate)
Called only once for Bytes and repeatedly for File until transfer is complete