diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index 43095ff68f..9884ffe237 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -166,7 +166,7 @@ class CupertinoWebSocket implements WebSocket { } _task .sendMessage(URLSessionWebSocketMessage.fromData(Data.fromList(b))) - .then((_) => _, onError: _closeConnectionWithError); + .then((value) => value, onError: _closeConnectionWithError); } @override @@ -176,7 +176,7 @@ class CupertinoWebSocket implements WebSocket { } _task .sendMessage(URLSessionWebSocketMessage.fromString(s)) - .then((_) => _, onError: _closeConnectionWithError); + .then((value) => value, onError: _closeConnectionWithError); } @override