FileStudyProtocolManager class

A StudyProtocolManager that loads and saves SmartphoneStudyProtocols as JSON files on the phone.

The path and filename format is given by filename.

Implemented types

Constructors

FileStudyProtocolManager()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

filename(String studyId) → String
The path and filename of the protocol with studyId, on the format
getStudyProtocol(String studyId) → Future<SmartphoneStudyProtocol?>
Gets a SmartphoneStudyProtocol based on its id. Returns null if no protocol exists.
override
initialize() → Future<void>
Logs the protocol file path. No other setup is needed.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveStudyProtocol(String studyId, SmartphoneStudyProtocol study) → Future<bool>
Saves study as JSON to filename. Returns true if successful.
override
toString() → String
A string representation of this object.
inherited

Operators

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