currentState method

Future<BluetoothDeviceState> currentState()

Just check current connect state directly

Implementation

Future<BluetoothDeviceState> currentState() {
  return FlutterBlue.instance._channel
      .invokeMethod('deviceState', id.toString())
      .then((buffer) => new protos.DeviceStateResponse.fromBuffer(buffer))
      .then((p) => BluetoothDeviceState.values[p.state.value]);
}