Supabase Flutter stream ( ) Private Channels Explained
Supabase's stream ( ) looks like a simple query, but it is really an initial PostgREST fetch plus a live Realtime subscription — and new tables ship with Realtime off. This guide wires it up correctly.
Contrary to what the method name suggests, stream() is not a live query that stays clever on its own — it is two systems glued together, and the glue fails silently when you skip the setup. This guide covers the supabase flutter stream private channel pattern properly: the mechanics of stream() , its filters, its primary keys, and how it merges PostgREST with Realtime. It deliberately does not cover private-channel RLS room authorization — that is a separate article's subject, and mixing the two is how teams end up debugging the wrong layer. What you'll learn Why new Supabase tables arrive with Realtime disabled, and where to enable it How stream() merges an initial PostgREST fetch with live Realtime events How to pass primaryKey so updates and deletes land on the right row How to filter, order and limit a stream without breaking live updates Why a row that stops matching your filter stays visible — and what to do about it How to persist a stream in a StatefulWidget so rebuilds do not drop the connection When to use stream() and when a raw channel is the better tool Watch: live lists without manual refresh 🎬 Watch: Flutter Supabase quickstart Watch the official Flutter quickstart first: it shows the project setup and live profile updates that stream() builds on. 600 ⏱ 600 · Supabase — click to play inline, or watch on YouTube . A live list should update itself — no pull-to-refresh, no polling timer. Why new tables arrive with Realtime off New tables are not in the Realtime publication by default. That is a safety default, not a bug: every table in the publication pays a replication cost, so Supabase makes you opt in. Until you add the table — in the dashboard under Database, Replication, or with ALTER PUBLICATION supabase_realtime ADD TABLE your_table; —…