close method

Future<void> close()

Closes the reader and cleans up resources.

Implementation

Future<void> close() async {
  await cancel();
  if (!_controller.isClosed) {
    await _controller.close();
  }
}