stop method

  1. @mustCallSuper
Future<void> stop()

Permanently stop collecting data for this StudyRuntime.

This entails stopping this study at the deploymentService. Once a runtime is stopped it cannot be (re)started.

Implementation

@mustCallSuper
Future<void> stop() async {
  // Early out in case study has already been stopped.
  if (status == StudyStatus.Stopped) return;

  // Stop study deployment.
  await deploymentService.stop(study!.studyDeploymentId);
  _status = StudyStatus.Stopped;
}