removeStudy method
Remove the study with studyDeploymentId
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(String studyDeploymentId) async {
// fast out if not a valid deployment id
if (!studies.containsKey(studyDeploymentId)) return;
info('Removing study from $runtimeType - $studyDeploymentId');
// Disconnecting from all devices will stop sensing on each of them.
await deviceController.disconnectAllConnectedDevices();
AppTaskController().removeStudyDeployment(studyDeploymentId);
var m = getStudyRuntime(studyDeploymentId)?.measurements;
if (m != null) _group.remove(m);
await super.removeStudy(studyDeploymentId);
}