title: Flutter Socket.listen() receives incomplete data
body: <p>Using a socket to receive string data. And it seems like the transmission is incomplete. The server sends around 80 KB and the flutter socket receives sometimes 1 KB and sometimes around 10 KB.</p>
  
  <p>Tried the onDone() handler and it's the same. It's called before the whole data is received.</p>
  
  <p>I also tried breaking the data into multiple pieces. And I get the first and the last packet, but lose everything between.</p>
  
  <p>Is this broken? Here is my code:</p>
  
  <pre><code>Future&lt;String&gt; getNetworkData() async {
    String rawData;
    await Socket.connect(ipAddr, port).then((Socket socket) {
      socket.add(utf8.encode(request));
      socket.listen((var data) {
        rawData = utf8.decode(data);
      });
  
    return rawData;
  }
  </code></pre>