persistInsert method

Future<void> persistInsert({
  1. required String table,
  2. required String localId,
  3. required Map<String, dynamic> payload,
  4. required Future<void> supabaseCall(),
})

Enqueue an insert event and then attempt the live Supabase call. Failures of the live call are swallowed — the row stays pending in the outbox and SyncWorker retries on the next online tick. Errors during enqueue (or on web with no outbox) propagate.

Implementation

Future<void> persistInsert({
  required String table,
  required String localId,
  required Map<String, dynamic> payload,
  required Future<void> Function() supabaseCall,
}) => _persist('insert', table, localId, payload, supabaseCall);