SmartphoneClientRepository class
A ClientRepository that runs on a smartphone. Works as a singleton.
Uses the PersistenceService infrastructure to store study information persistently
across app restarts.
Constructors
- SmartphoneClientRepository()
-
Get the singleton SmartphoneClientRepository.
factory
Properties
- deviceRegistration ↔ DeviceRegistration?
-
The
DeviceRegistrationused to register the client in deployments.getter/setter pairoverride - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
studyStatusEvents
→ Stream<
StudyStatusEvent< SmartphoneStudy> > -
A stream of
StudyStatusEventevents generate whenever a study change state.no setter
Methods
-
addStudy(
SmartphoneStudy study) → void -
Adds
studyto the repository.override -
getStudy(
String studyDeploymentId, String deviceRoleName) → SmartphoneStudy? -
Return the study with
studyDeploymentIdanddeviceRoleName, or null when no such study is found.override -
getStudyList(
) → List< SmartphoneStudy> -
Return all studies in this repository. May be an empty list if no
studies have been added.
override
-
hasStudy(
SmartphoneStudy study) → bool -
Is
studyin this repository?override -
init(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeStudy(
SmartphoneStudy study) → void -
Remove
studywhich is already stored in the repository. In casestudyis not stored in this repository, nothing happens.override -
toString(
) → String -
A string representation of this object.
override
-
updateStudy(
SmartphoneStudy study) → void -
Update a
studywhich is already stored in the repository. In casestudyis not stored in this repository, nothing happens.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited