connectDevice method
Implementation
Future<bool> connectDevice(DeviceModel device) async {
try {
await DeviceApi().connectDevice(device);
return true;
} on DioError catch (err) {
final errorMessage = DioException.fromDioError(err).toString();
throw errorMessage;
}
}