SmartphoneDeployment.fromPrimaryDeviceDeploymentAndSmartphoneStudyProtocol constructor
SmartphoneDeployment.fromPrimaryDeviceDeploymentAndSmartphoneStudyProtocol({
- String? studyId,
- String? studyDeploymentId,
- String? participantId,
- String? participantRoleName,
- required PrimaryDeviceDeployment deployment,
- required SmartphoneStudyProtocol protocol,
Create a SmartphoneDeployment that combines a PrimaryDeviceDeployment
and
a SmartphoneStudyProtocol.
It takes the deployment information from the deployment
(such as device
configuration, device registration, and what devices are connected) and
takes the data collection configuration from the protocol
(such as
task, triggers, task controls, and expected participant data).
Implementation
SmartphoneDeployment.fromPrimaryDeviceDeploymentAndSmartphoneStudyProtocol({
this.studyId,
String? studyDeploymentId,
this.participantId,
this.participantRoleName,
required PrimaryDeviceDeployment deployment,
required SmartphoneStudyProtocol protocol,
}) : super(
deviceConfiguration: deployment.deviceConfiguration,
registration: deployment.registration,
connectedDevices:
protocol.connectedDevices ?? deployment.connectedDevices,
connectedDeviceRegistrations: deployment.connectedDeviceRegistrations,
tasks: protocol.tasks,
triggers: protocol.triggers,
taskControls: protocol.taskControls,
expectedParticipantData: protocol.expectedParticipantData ??
deployment.expectedParticipantData,
) {
_studyDeploymentId = studyDeploymentId ?? const Uuid().v1;
_data.studyDescription = protocol.studyDescription;
_data.dataEndPoint = protocol.dataEndPoint;
_data.privacySchemaName = protocol.privacySchemaName;
_data.applicationData = protocol._data.applicationData;
}