ble_peer_session 0.4.3
ble_peer_session: ^0.4.3 copied to clipboard
Offline 1:1 peer sessions over BLE for Flutter — host/client model, invitation handshake, and bidirectional messaging.
0.4.3 #
- Android: reopen a fresh GATT server in
BleLinkServerImpl.startAdvertisingAsbefore adding the service. FixesIllegalStateException(addService) when a host session is started again after a previous host advertising was stopped and torn down (the singletonPeripheralManageronly reopens GATT on adapter power-on transitions).
0.4.2 #
- Android: lazy-init
PeripheralManageron the server link so client-only sessions do not open a GATT server at peer creation. - Android: tear down GATT services and close the GATT server on server link dispose to avoid dual central/peripheral conflicts during host/client role switches (Samsung).
- Transport: increase post-MTU settle delay on the central link from 300ms to 500ms.
0.4.1 #
- Pub score: add standard
example/layout for pub.dev (160/160 pub points). - Documentation: library dartdoc and
BlePeerConfigfield comments. - Style:
dart formatacrosslib/andtest/; remove redundantdart:typed_dataimports.
0.4.0 #
- Transport: GATT disconnect detection (central/peripheral connection state callbacks).
- Transport: Session heartbeat watchdog (5s ping, 15s inactivity timeout).
- API:
Peer.disconnectStreamandPeerDisconnectReasonfor unified session-end events.
0.3.5 #
- Documentation: fix README diagram on pub.dev — use absolute
raw.githubusercontent.comURL (relative links break when default branch ismain, notmaster).
0.3.4 #
- Documentation: replace the ASCII host/client sequence diagram in the README with an illustrated connection-flow image (
doc/assets/connection-flow.jpg).
0.3.3 #
- Documentation: refined README — use cases, host/client diagrams, role-based quick start, compact core model, reordered sections (example app before errors), internals isolated for contributors.
0.3.2 #
- Documentation: restructured README (TL;DR first, single connection flow, grouped sections);
doc/README.mdindex; updated migration guides, error codes, andexample/minimal_chatREADME.
0.3.1 #
- Framing: logical messages larger than the BLE MTU are split and reassembled on the link layer (
BleFrameCodec,BleFrameAssembler). - Limits: default chunk payload 480 bytes, max logical message 256 KiB; legacy unframed payloads still accepted on receive.
- Tests: unit tests for fragment/reassemble, oversized payload, corrupt frames, legacy passthrough.
- Example:
example/minimal_chat— host/client role picker and bidirectional text chat.
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: beginner API quick start.
- 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.