connectToAddress method

  1. @override
Stream<DeviceConnectionState> connectToAddress(
  1. String address,
  2. int? phy
)
override

Implementation

@override
Stream<DeviceConnectionState> connectToAddress(
    String address, int? phy) async* {
  await methodChannel
      .invokeMethod('connectToDevice', {'id': address, 'phy': phy});
  yield* EventChannel(address)
      .receiveBroadcastStream()
      .map((event) => DeviceConnectionState.values[event]);
}