Skip to content

Commit b33948b

Browse files
tvolkertgoto-bus-stop
authored andcommitted
Prepare for upcoming change to HttpRequest and HttpClientResponse (#12)
* Prepare for upcoming change to HttpRequest and HttpClientResponse An upcoming change to the Dart SDK will change `HttpRequest` and `HttpClientResponse` from implementing `Stream<List<int>>` to implementing `Stream<Uint8List>`. This forwards-compatible change prepares for that SDK breaking change by casting the Stream to `List<int>` before transforming it. dart-lang/sdk#36900 * drop +1
1 parent ef711fb commit b33948b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/event_source.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ class EventSource {
132132
// is only called once per connection.
133133
var reconnectOnce = _onceFunc(_reconnect);
134134
response
135+
.cast<List<int>>()
135136
.transform(utf8.decoder)
136137
.transform(LineSplitter())
137138
.listen(_onMessage, onDone: reconnectOnce, onError: (_) {

0 commit comments

Comments
 (0)