sse_stream

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

sse stream

Dart SSE Stream #
Just simple package which parses SSE from text stream I wrote for myself
Usage #
Basically, package gives SseEventTransformer, which accepts Stream
final Response<ResponseBody> resp = await dio.post(
path,
data: data,
options: Options(responseType: ResponseType.stream),
);
resp.data?.stream
.cast<List<int>>()
.transform(Utf8Decoder())
.transform(const SseEventTransformer())
.listen((event) {
// do something here
print('new event: $event');
},
);
copied to clipboard
This example shows how to parse data from Dio response, example folder contains sample for http package

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.