queue/persistent_queue_store library
Persistent queue store that survives app restarts.
Stores serializable request metadata as JSON on disk. Unlike closures, this approach persists HTTP request details (method, URL, headers, body) so they can be reconstructed and replayed after an app restart.
final store = PersistentQueueStore(
directory: await getApplicationDocumentsDirectory(),
);
await store.initialize();
final queue = RequestQueue(store: store);
Classes
- PersistentQueueStore
- A QueueStore implementation that persists queued requests as a JSON file on disk.
- SerializableRequest
- A serializable representation of an HTTP request that can be persisted to disk and reconstructed later.
Typedefs
- RequestExecutor = Future Function(SerializableRequest request)
- Callback that executes a SerializableRequest and returns the result.