Fix various strong mode issues. (#14284)

This commit is contained in:
Vyacheslav Egorov
2018-01-31 08:21:32 +01:00
committed by GitHub
parent 122796137b
commit 340d9e00cf
7 changed files with 20 additions and 6 deletions

View File

@@ -479,7 +479,10 @@ void main() {
return test.main;
});
WebSocket.connect(server).then((WebSocket socket) {
socket.map(JSON.decode).pipe(channel.sink);
socket.map((dynamic x) {
assert(x is String);
return JSON.decode(x);
}).pipe(channel.sink);
socket.addStream(channel.stream.map(JSON.encode));
});
}