Dart package to help consume Server Sent Events
- Consumes server sent events
- Returns parsed model of the event, id and the data
Add the following import in the pubspec.yaml
file
client_sse:
git:
url: https://github.com/pratikbaid3/flutter_client_sse
path:
SSEClient.subscribeToSSE(url,token)
.listen((event) {
print('Id: ' + event.id);
print('Event: ' + event.event);
print('Data: ' + event.data);
});