Persistence class

A persistence layer that knows how to persistently store deployment and app task information across app restart.

Constructors

Persistence()
factory

Properties

database ↔ Database?
getter/setter pair
databaseName String
Full path and name of the database.
no setter
databasePath String
Path of the database.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Close the persistence layer. After close is called, no deployment can be accessed or saved.
eraseDeployment(String deploymentId) Future<void>
Erase the SmartphoneDeployment with the deploymentId from local cache.
getAllStudyDeployments() Future<List<SmartphoneStudy>>
Get the list of all study deployments previously stored on this phone.
getUserTasks() Future<List<UserTaskSnapshot>>
Get the entire list of UserTaskSnapshot.
init([SmartphoneDeployment? deployment]) Future<void>
Initialize the persistence layer and the database.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restoreDeployment(String deploymentId) Future<SmartphoneDeployment?>
Restore the SmartphoneDeployment with the deploymentId from local cache. Returns a SmartphoneDeployment if successful, null otherwise.
saveDeployment(SmartphoneDeployment deployment) Future<bool>
Save the deployment persistently to a local cache. Returns true if successful.
saveUserTask(UserTask task) Future<void>
Update or delete a task queue entry.
toString() String
A string representation of this object.
inherited

Operators

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