BtConnectionManager class

A helper class to manage Bluetooth connections with auto-reconnection support.

This addresses the "thin API" criticism by providing robust connection lifecycle management.

Constructors

BtConnectionManager({required String address, Duration retryInterval = const Duration(seconds: 5), int maxRetries = 5, BtService? service})

Properties

address String
final
data Stream<Uint8List>
no setter
hashCode int
The hash code for this object.
no setterinherited
maxRetries int
final
retryInterval Duration
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state Stream<String>
no setter

Methods

connect() Future<void>
Start the connection manager. It will attempt to connect and automatically reconnect if the connection drops.
disconnect() Future<void>
Stop the connection manager and disconnect.
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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