JsonFileQueueStore class

Persists the queue as a JSON file, rewritten atomically on every change (write to a temp file, then rename).

Suitable for small queues on dart:io platforms. For large queues or transactional guarantees with your app data, implement QueueStore on your database instead.

Implemented types

Constructors

JsonFileQueueStore(File file)
Creates a store backed by file.

Properties

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

Methods

delete(String id) → Future<void>
Removes the operation with id, if present.
override
loadAll() → Future<List<QueuedOperation>>
All operations, in any order.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(QueuedOperation operation) → Future<void>
Inserts or replaces operation by id.
override
toString() → String
A string representation of this object.
inherited

Operators

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