addStudy method

  1. @mustCallSuper
Future<StudyStatus> addStudy(
  1. Study study
)

Add a study which needs to be executed on this client. This involves registering this device for the specified study deployment.

  • studyDeploymentId - The ID of a study which has been deployed already and for which to collect data.
  • deviceRoleName - The role which the client device this runtime is intended for plays as part of the deployment identified by studyDeploymentId.

Returns the StudyStatus of the newly added study.

Implementation

@mustCallSuper
Future<StudyStatus> addStudy(Study study) async {
  assert(isConfigured,
      'The client manager has not been configured yet. Call configure() first.');
  assert(!repository.containsKey(study),
      'A study with the same study deployment ID and device role name has already been added.');
  return StudyStatus.DeploymentNotStarted;
}