Closed trumanleung closed 4 years ago
Hi! Thanks for reporting an issue!
This is intended behaviour. pubnub.subscribe
returns a Future<Subscription>
and you need to use await
to unwrap the Subscription
from the future.
Take a look at this article: https://dart.dev/codelabs/async-await
Thank you. I added await before the pubnub.subscribe call and it works.
After subscribing to a channel, the Future doesn't have a messages stream. Here's my code. pubnubChannel is a string with the name of the channel.
I'm getting this error: The getter 'messages' isn't defined for the class 'Future'.