I have been using this library and it worked fine but I have one problem with it: when the server closes the connection (Which I have checked is done right and works on postman for example), I cannot figure out how to detect it.
So I have made a EventStreamManager class that handles the stream because I needed a broadcast stream (then I figured out I could maybe do it simpler but that's not the point).
I can get events and all but nothing ever passes in the onDone callback function. I have tried everything but I cannot figure out how to make it work.
Hello there,
I have been using this library and it worked fine but I have one problem with it: when the server closes the connection (Which I have checked is done right and works on postman for example), I cannot figure out how to detect it.
So I have made a EventStreamManager class that handles the stream because I needed a broadcast stream (then I figured out I could maybe do it simpler but that's not the point).
I can get events and all but nothing ever passes in the onDone callback function. I have tried everything but I cannot figure out how to make it work.
Has someone ever made it work ?
EventStreamManager.dart
ApiClient.startListeningForEvents function: