connect method

  1. @override
Future<IBleDevice> connect({
  1. Duration duration = const Duration(seconds: 2),
  2. bool autoConnect = false,
})
override

Connect to the Device

Implementation

@override
Future<IBleDevice> connect(
    {Duration duration = const Duration(seconds: 2),
    bool autoConnect = false}) async {
  await Future.delayed(const Duration(seconds: 2)).then((value) {
    _bleDeviceConnectionStateChangeListener?.onDeviceConnectionStateChanged(
        device: this, newGattState: BleConnectionState.connected);
  });
  return this;
}