close method

Future<void> close()

Closes the reader and cleans up resources.

Implementation

Future<void> close() async {
  _escTimer?.cancel();
  _escTimer = null;
  await _reader.close();
  if (!_eventController.isClosed) {
    await _eventController.close();
  }
}