connectToBluetoothDevice method

Stream<String> connectToBluetoothDevice(
  1. String name,
  2. String pin
)

Stream which splits the bluetooth adapter state

Implementation

Stream<String> connectToBluetoothDevice(String name, String pin) {
  String method = "connectBleDevice";
  _connectionStatus[method] = _getConnectionStreamController<String>(method);
  _channel.invokeMethod(method, {"name": name, "pin": pin});
  print(_connectionStatus[method]!.stream.toString());
  return _connectionStatus[method]!.stream;
}