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 DeviceRegistration used to register the client in deployments; null when none is stored. ClientManager.configure writes 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 study to the repository.
override
getStudy(String studyDeploymentId, String deviceRoleName) → SmartphoneStudy?
Return the study with studyDeploymentId and deviceRoleName, 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 study in 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 study which is already stored in the repository. In case study is not stored in this repository, nothing happens.
override
toString() → String
A string representation of this object.
override
updateStudy(SmartphoneStudy study) → void
Update a study which is already stored in the repository. In case study is not stored in this repository, nothing happens.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited