removeStudy method

void removeStudy(
  1. SmartphoneStudy study
)

Removes all tasks of study and cancels their notifications.

Implementation

void removeStudy(SmartphoneStudy study) {
  final userTasks = _userTaskMap.values
      .where((task) => task.appTaskExecutor.deployment?.studyDeploymentId == study.studyDeploymentId)
      .toList();

  for (var task in userTasks) {
    dequeue(task.id);
  }
}