Home

Listen to database changes

Notifies of data at the queried table.

  • stream() will emit the initial data as well as any further change on the database as Stream of List<Map<String, dynamic>> by combining Postgrest and Realtime.
  • Takes a list of primary key columns as its argument.

supabase.from('countries')
  .stream(primaryKey: ['id'])
  .listen((List<Map<String, dynamic>> data) {
  // Do something awesome with the data
});
Need some help?

Not to worry, our specialist engineers are here to help. Submit a support ticket through the Dashboard.