ResponseStream constructor

ResponseStream(
  1. 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());
}