SharedPrefsQueue class

FeedbackQueue backed by SharedPreferences.

Entries survive app restarts and offline periods. Each entry is stored as a compact JSON string via FeedbackEntry.encode / FeedbackEntry.decode.

final backend = QueuedBackend(
  backend: WebhookBackend(url: 'https://example.com/feedback'),
  queue: SharedPrefsQueue(),
);
Implemented types

Constructors

SharedPrefsQueue({SharedPreferencesAsync? prefs})
Creates a SharedPrefsQueue.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Removes all entries from the queue.
override
enqueue(FeedbackEntry entry) Future<void>
Appends entry to the end of the queue.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pending() Future<List<FeedbackEntry>>
Returns all queued entries that have not yet been delivered.
override
toString() String
A string representation of this object.
inherited

Operators

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