SmartphoneClientRepository class
Stores the studies of the SmartPhoneClientManager on the phone.
A singleton ClientRepository that keeps studies in memory and saves them
with the PersistenceService, so they survive app restarts.
Constructors
- SmartphoneClientRepository()
-
Returns the singleton SmartphoneClientRepository.
factory
Properties
- deviceRegistration ↔ DeviceRegistration?
-
The
DeviceRegistrationused to register the client in deployments; null when none is stored.ClientManager.configurewrites the registration given to it here.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> > -
The
StudyStatusEvents of all studies in this repository.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> - Loads all studies from the PersistenceService.
-
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