-
-
Notifications
You must be signed in to change notification settings - Fork 70
stream doesn't update realtime #41
Comments
I have the same issue. when insert, new row is insert but the stream is not update
already allow realtime for that table
|
Thanks @akram-95 for opening this issue and @StevePhuc for also adding more context! Could you confirm that you have https://app.supabase.io/project/[YOUR_PROJECT_ID]/database/replication I apologize for not including instructions around turning realtime on in the readme. I will add it as soon as I can get to it! |
Hello @dshukertjr , yeah o confirm that I enabled all real time functions |
@akram-95 Could you share the scheme of the table at which you are trying to listen to as stream? |
after update sql with
|
@StevePhuc @akram-95 Could you also try running? alter table your_table_name replica identity full; |
@StevePhuc When I run SELECT CASE relreplident
WHEN 'd' THEN 'default'
WHEN 'n' THEN 'nothing'
WHEN 'f' THEN 'full'
WHEN 'i' THEN 'index'
END AS replica_identity
FROM pg_class
WHERE oid = 'mytablename'::regclass; I get |
@dshukertjr |
@dshukertjr |
When I did run it , I did get no rows gets |
@StevePhuc |
@akram-95 @StevePhuc For me, it's working when replica identity is set to |
@akram-95 Anyway, let me start over. I did create a brand new Supabase project, and was able to receive all
StreamBuilder<List<Map<String, dynamic>>>(
stream: supabase.from('chats').stream().order('id').limit(30).execute(),
builder: (context, snapshot) {
if (snapshot.hasError) {
return Center(child: Text(snapshot.error.toString()));
}
if (snapshot.connectionState == ConnectionState.active) {
final dataList = snapshot.data!;
return ListView.builder(
itemCount: dataList.length,
itemBuilder: (context, index) {
final data = dataList[index];
return ListTile(
title: Text(data['text']),
);
},
);
} else {
return Container();
}
},
) |
@dshukertjr I did make it exactly how you told me |
@dshukertjr Now I have another issue , I get this error when I use nested Streambuilder |
@akram-95 Thanks for reporting the issue with nested |
Bug report
Describe the bug
using stream will my UI just update when i add new value but when i delete value, it will not update
The text was updated successfully, but these errors were encountered: