removeStudy method

  1. @override
Future<void> removeStudy(
  1. Study study
)
override

Remove study from this client manager.

Note that by removing a study, the deployment is not marked as stopped permanently in the deployment service. Hence, the study can later be added and deployed again using the addStudy and tryDeployment methods.

If a study deployment is to be permanently stopped, use the stopStudy method.

Implementation

@override
Future<void> removeStudy(Study study) async {
  info('Removing study from $runtimeType - $study');

  // Disconnecting from all devices will stop sensing on each of them.
  await deviceController.disconnectAllConnectedDevices();

  AppTaskController().removeStudyDeployment(study.studyDeploymentId);

  var m = getStudyRuntime(study)?.measurements;
  if (m != null) _group.remove(m);

  await super.removeStudy(study);
}