Assistant API streaming in Flutter

I’m trying to implement listening to the stream from the assistant while it is responding with Flutter.
However, when I create a stream and listen to it, it returns only the first messages.

I can see how it works in the Playground:

  1. Send a message to /v1/threads/thread_____/messages.
  2. Run a thread and listen to the stream - all messages appear at /v1/threads/thread_____/runs.

But when I do the same with Flutter, for example:

final Uri uri = Uri.https(AiConsts.apiBase, '${AiConsts.apiVer}threads/$threadId/runs');

final requestBody = {
  "assistant_id": AiConsts.assistantId,
  "additional_instructions": null,
  "tool_choice": null,
};

final HttpClient client = HttpClient();

client.postUrl(uri).then((HttpClientRequest request) {
  AiConsts.requestHeadersThreads.forEach((key, value) {
    request.headers.add(key, value);
  });

  request.write(jsonEncode(requestBody));

  return request.close();
}).then((HttpClientResponse response) {
  response.transform(utf8.decoder).listen((contents) {
    print(contents);
  });
});

it returns only the first message.