markSyncing method

void markSyncing(
  1. int id
)

Mark an event as in-flight to a Supabase write. Prevents the SyncWorker from picking it up again if it crashes mid-call.

Implementation

void markSyncing(int id) {
  _requireReady();
  _db!.execute(
    "UPDATE outbox_events SET state = 'syncing', last_attempt_at = ? WHERE id = ?",
    [DateTime.now().toUtc().toIso8601String(), id],
  );
}