BluetoothConnection.fromConnectionId constructor
BluetoothConnection.fromConnectionId(
- int _id,
- String address
)
Implementation
BluetoothConnection.fromConnectionId(this._id, this.address)
: _readChannel = EventChannel(
"${MethodChannelFlutterBlueClassic.namespace}/connection/$_id") {
_readStreamController = StreamController<Uint8List>();
_readStreamSubscription =
_readChannel.receiveBroadcastStream().cast<Uint8List>().listen(
_readStreamController.add,
onError: _readStreamController.addError,
onDone: close,
);
input = _readStreamController.stream;
output = BluetoothStreamSink(_id);
}