How can I continuously listen to a topic?
This type of code works fine when I already have messages in the queue, but If after the initial call of this code if I receive other messages, the messages don't get processes.
await for (var message in channel1.messages) {
// message processing
}
Is this the way the library should work? I am missing something? should the code live in a special object? I haven't touched OOP in a while and I am new to flutter/dart.
Thank you!
How can I continuously listen to a topic? This type of code works fine when I already have messages in the queue, but If after the initial call of this code if I receive other messages, the messages don't get processes.
Is this the way the library should work? I am missing something? should the code live in a special object? I haven't touched OOP in a while and I am new to flutter/dart. Thank you!