setLockUnlockAction method

Future<void> setLockUnlockAction(
  1. String deviceId,
  2. bool setLock, {
  3. GetDeviceDetailsMethod getDetails = DevicesRepository.getDeviceDetails,
  4. SendLockUnlockFunction sendLockUnlock = LockRepository.sendLockUnlockAction,
})

Implementation

Future<void> setLockUnlockAction(String deviceId, bool setLock,
    {GetDeviceDetailsMethod getDetails = DevicesRepository.getDeviceDetails,
    SendLockUnlockFunction sendLockUnlock =
        LockRepository.sendLockUnlockAction}) async {
  return performAction<bool>(setLock, () => getIsLockedState,
      () => sendLockUnlock(_request, deviceId, setLock),
      getDetails: getDetails);
}