LocalStore class
An in-memory store for SyncRecord instances.
Provides CRUD operations, filtering by status, and aggregate statistics.
Constructors
Properties
Methods
-
all(
) → List< SyncRecord> - Return all records in the store.
-
clear(
) → void - Remove all records from the store.
-
get(
String id) → SyncRecord? -
Retrieve a record by
id, ornullif not found. -
markModified(
String id) → void -
Mark the record with
idas SyncStatus.modified. -
markSynced(
String id) → void -
Mark the record with
idas SyncStatus.synced. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pending(
) → List< SyncRecord> - Return all records with SyncStatus.pending or SyncStatus.modified.
-
put(
SyncRecord record) → void -
Store a
record, replacing any existing record with the same id. -
putAll(
List< SyncRecord> records) → void -
Store multiple
recordsat once. -
query(
{required bool where(SyncRecord)}) → List< SyncRecord> -
Query records using a
wherepredicate. -
queryByTag(
String tag) → List< SyncRecord> -
Return all records that contain the given
tag. -
remove(
String id) → bool -
Remove the record with the given
id. -
statistics(
) → StoreStatistics - Return aggregate statistics about the store contents.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited