flutter_persistent_queue 0.1.2 flutter_persistent_queue: ^0.1.2 copied to clipboard
Simple file-based non-volatile queue for flutter. Ideal for in-device sequential buffers that persist between app runs.
persistent_queue #
Simple file-based non-volatile queue library for flutter.
Installation #
Add dependency to pubspec.yaml
:
dependencies:
...
flutter_persistent_queue: ^0.1.2
Run in your terminal:
flutter packages get
How it works #
Each JSON-encodable item to be queued goes to its own non-volatile file on the
flutter-compatible devices. This particular design choice limits potential use
cases requiring very long queues but otherwise provides high performance with
very reduced resource usage, as it doesn't require serializing and deserializing
contiguous or chunked dart:collections
to the filesystem.
It's built on top of the also minimalistic Localstorage library. Concurrency-safety and sequential correctness is provided by the fantastic and easy to use Synchronized reentrant locks.
License #
MIT