outboxedWrites function

  1. @Riverpod(keepAlive: true)
OutboxedWrites outboxedWrites(
  1. Ref<Object?> ref
)

Helper that funnels Supabase writes through the OfflineOutbox. On web (no outbox), it falls through to direct Supabase calls. Screens and notifiers can write through this without re-implementing the enqueue / call / mark-synced dance per call site.

Implementation

@Riverpod(keepAlive: true)
OutboxedWrites outboxedWrites(Ref ref) {
  return OutboxedWrites(ref.watch(offlineOutboxProvider));
}