pendingCount method

int pendingCount()

Count of unsynced rows. Used by Settings to surface a "N pending" hint and by SyncWorker to short-circuit when empty.

Implementation

int pendingCount() {
  _requireReady();
  final rs = _db!.select(
    "SELECT COUNT(*) AS c FROM outbox_events WHERE state != 'synced'",
  );
  return (rs.first['c'] as int?) ?? 0;
}