dispose method

void dispose()

Cancel the subscription to stream, and reset the internal state, then close the internal stream controller.

if the HTTP client is internally generated, close it.

Implementation

void dispose() {
  logDebug('Disposing stream reader.');

  stop(closeController: true);

  if (_isInnerClient) {
    _client.close();
  }
}