ble_peer_session 0.3.0
ble_peer_session: ^0.3.0 copied to clipboard
Offline BLE peer-to-peer sessions for Flutter — discovery, consent handshake, and bidirectional messaging.
0.3.0 #
- Beginner API:
Peer.create(appName: 'MyGame')with auto-generated stable UUIDs (BlePeerConfig.forApp). PeerUserreplaces manualPeerEndpointsetup for most apps;PeerNearbyfor discovered hosts.- Shortcuts:
peer.host(localUser:)andpeer.client(localUser:). - Client:
invite(PeerNearby)alias;nearbyHostsStreamover raw devices. - Messaging:
sendText(),textMessages,sendJson(),jsonMessages;PeerMessage.text/PeerMessage.app. SilentLoggerwhen no logger is passed.- README: 15-second quick start examples first.
- 0.2 APIs preserved via
startWithEndpoint,connect(device), explicitconfig.
0.2.0 #
- Breaking: new public API —
Peer,PeerHost,PeerClient,PeerMessage,PeerException,PeerErrorCode,PeerConnectionPhase,PeerAdapterStatus. - Breaking: removed exports of
TransportFacade,TransportSession*,TransportSessionState, session message classes, andBluetooth*Exception. - Unified errors into
PeerExceptionwithPeerErrorCode. - Adapter status via
Peer.adapterStatusStream(no auto-enable Bluetooth). - Documentation: mental model diagrams, connection/message flow, ERROR_CODES.md, MIGRATION.md.
- 1:1 sessions only; second central rejected at link layer.
0.1.2 #
- Fixed role switching in
BleTransportFacadeImpl: skipdisconnect()when the active session is uninitialized, preventing crashes on firststartClientTransportSession/startServerTransportSession. - Added state-aware
disconnect()for client and server sessions (discovery, awaiting decision, connected). - Added
BleLinkReadinessto verify Bluetooth permissions and powered-on state before discovery/advertising. - Added
BluetoothUnsupportedException,BluetoothPermissionsDeniedException, andBluetoothPeripheralUnavailableException. - Added tests for facade role switching.
0.1.1 #
- Removed unused dependencies (
json_annotation,build_runner,json_serializable). - Updated
flutter_blue_plusandpermission_handler.
0.1.0 #
- Initial release: BLE P2P session transport for Flutter.
- Discovery, invitation/acceptance handshake, bidirectional messaging.
PeerMessageenvelope for app-level payloads.BlePeerSessionModulefactory and Bluetooth permission/state helpers.