Hi,
I'm building an app using flutter, firebase, redux, redux_thunk.
I'm not sure if middleware is even the right place, but currently I'm invoking a backend service streamChat from my middleware, that returns a stream of chat messages from firestore.
I know how to create a subscription to the listener within the function, but i'm confused on how to reach the subscription and cancel it on user logout. Right now an exception is getting thrown.
Hi, I'm building an app using flutter, firebase, redux, redux_thunk.
I'm not sure if middleware is even the right place, but currently I'm invoking a backend service
streamChat
from my middleware, that returns a stream of chat messages from firestore.I know how to create a subscription to the listener within the function, but i'm confused on how to reach the subscription and cancel it on user logout. Right now an exception is getting thrown.
Kindly advise on best practice. Thanks.