connectDevice method

Future<bool> connectDevice(
  1. DeviceModel device
)

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;
  }
}