LocalStorePersistentStorage class
Default implementation of PersistentStorage using Localstore package
- Implemented types
Constructors
Properties
- currentDatabaseVersion → (String, int)
-
Name and version number for this type of persistent storage
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- log → Logger
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
storedDatabaseVersion
→ Future<
(String, int)> -
Name and version number for database as stored
no setteroverride
Methods
-
initialize(
) → Future< void> -
Initialize the database - only called when the
BaseDownloader
is created with this object, which happens when the FileDownloader singleton is instantiated, OR as part of a migration away from this database type.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String collection, [String? identifier]) → Future< void> -
Removes document with
identifier
fromcollection
-
removePausedTask(
String? taskId) → Future< void> -
Remove paused Task with
taskId
from storage. If null, remove alloverride -
removeResumeData(
String? taskId) → Future< void> -
Remove ResumeData with
taskId
from storage. If null, remove alloverride -
removeTaskRecord(
String? taskId) → Future< void> -
Remove TaskRecord with
taskId
from storage. If null, remove alloverride -
retrieve(
String collection, String identifier) → Future< Map< String, dynamic> ?> -
Returns
document
stored incollection
under keyidentifier
as aMap<String, dynamic>
, or null if not found -
retrieveAll(
String collection) → Future< Map< String, dynamic> > -
Returns all documents in collection as a
Map<String, dynamic>
keyed by the document identifier, with the value aMap<String, dynamic>
representing the document -
retrieveAllPausedTasks(
) → Future< List< Task> > -
Retrieve all paused Task
override
-
retrieveAllResumeData(
) → Future< List< ResumeData> > -
Retrieve all ResumeData
override
-
retrieveAllTaskRecords(
) → Future< List< TaskRecord> > -
Retrieve all TaskRecord
override
-
retrievePausedTask(
String taskId) → Future< Task?> -
Retrieve paused
Task
withtaskId
, or null if not foundoverride -
retrieveResumeData(
String taskId) → Future< ResumeData?> -
Retrieve
ResumeData
withtaskId
, or null if not foundoverride -
retrieveTaskRecord(
String taskId) → Future< TaskRecord?> -
Retrieve
TaskRecord
withtaskId
, or null if not foundoverride -
store(
Map< String, dynamic> document, String collection, String identifier) → Future<void> -
Stores Map<String, dynamic> formatted
document
incollection
keyed underidentifier
-
storePausedTask(
Task task) → Future< void> -
Store a paused
task
, keyed by taskIdoverride -
storeResumeData(
ResumeData resumeData) → Future< void> -
Store ResumeData, keyed by its taskId
override
-
storeTaskRecord(
TaskRecord record) → Future< void> -
Store a TaskRecord, keyed by taskId
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- metaDataCollection → const String
- pausedTasksPath → const String
- resumeDataPath → const String
- taskRecordsPath → const String