SmartphoneStudy.fromInvitation constructor

SmartphoneStudy.fromInvitation(
  1. ActiveParticipationInvitation invitation
)

Creates a SmartphoneStudy from an invitation to a study.

The device role name defaults to Smartphone.DEFAULT_ROLE_NAME.

Implementation

SmartphoneStudy.fromInvitation(ActiveParticipationInvitation invitation)
  : this(
      studyId: invitation.studyId,
      studyDeploymentId: invitation.studyDeploymentId,
      deviceRoleName: invitation.deviceRoleName ?? Smartphone.DEFAULT_ROLE_NAME,
      participantId: invitation.participantId,
      participantRoleName: invitation.participantRoleName,
    );