title: Flutter Await Callback Not Give Any Response
body: <p>I am still a beginner on dart flutter, now I am trying to retrieve data from the REST API and socket.IO. at this time I have a confusing problem, I have tried searching on the internet for 3 days, but there is no solution. I have async and await scripts, but the function I added await doesn't give any response and still pause.</p>
  
  <p>it is assumed that I have two different files, the first is the main file and the second is the helper file.</p>
  
  <p><strong>main.dart</strong></p>
  
  <pre><code>Future&lt;List&lt;ChatTile&gt;&gt; fetchChat(socketutil,id) async {
  
    socketutil.join(id); //STACK IN HERE
    SharedPreferences prefs = await SharedPreferences.getInstance();
    String messagePrefs = prefs.getString('messagePrefs');
    print("DUA");
    return await compute(parseListChat, messagePrefs);
  }
  </code></pre>
  
  <p><strong>helper.dart</strong></p>
  
  <pre><code>Future&lt;void&gt; join(String id_room) async {
        String jsonData ='{"room_id" : "$id_room","user_id" : "5a91687811138e74009839c9","user_name" : "Denis Muhammad Ramdan","user_photo" : "photo.jpg","user_status" : "1"}';
        socketIO.sendMessage("join", jsonData, null);
        //subscribe event
        return await socketIO.subscribe("updateMessageList", (result) async {
          SharedPreferences prefs = await SharedPreferences.getInstance();
          await prefs.setString('messagePrefs', result);
          print('SATU');
          return await result;
        });
    }
  </code></pre>
  
  <p><strong>my  question is there something wrong with my code, and how is the best way?</strong></p>
  
  <p>many thanks,</p>