"Supabase Realtime Broadcast in Flutter: Complete Guide"

"Use Supabase Realtime Broadcast in Flutter for typing indicators, game moves, live cursors — ephemeral events, no database writes. Full code included."

Not every realtime event deserves a database row. A typing indicator lives for three seconds. A game move is stale the moment the next one arrives. A live cursor is pure ephemera. Writing those to Postgres just so postgres_changes can forward them means pointless writes, pointless RLS checks, and a table full of garbage you'll vacuum later. That's exactly what the Supabase realtime broadcast Flutter API solves: clients send events straight to each other over the realtime socket, with no database write at all. In this guide you'll open a broadcast channel, listen with onBroadcast , send with sendBroadcastMessage , and build a complete typing indicator — plus learn when broadcast beats postgres_changes and the gotchas (no history, no replay, self-echo) that surprise everyone the first time. Last updated: October 3, 2026 What you'll learn What broadcast is and how it differs from postgres_changes Opening a channel and listening with onBroadcast in Flutter Sending ephemeral events with sendBroadcastMessage A complete typing-indicator implementation (the canonical use case) Broadcast vs postgres_changes : when to use which Private channels, RLS, and the reconnect/no-replay gotchas Supabase Realtime Broadcast Flutter: Core Concepts Supabase Realtime has three message types. You've likely met the first: postgres_changes — database-driven. A row changes in Postgres, the change is forwarded to subscribed clients. Durable, replayable on re-subscribe (you can refetch), gated by RLS. broadcast — socket-driven. One client sends a JSON payload to a channel; the realtime server relays it to the other subscribers. No database write, no history, no replay. presence — socket-driven state ("who's online"), a separate topic of its own. Broadcast is the right…

Explore