ResponseStream constructor
ResponseStream(
- SseClient client
Implementation
ResponseStream(SseClient client) : _client = client {
events = _client.stream.map((i) => ResponseEvent.fromJson(jsonDecode(i.data)));
_client.stream.where((x) => x is ResponseCompleted).map((_) async => await close());
}