close method

Future<void> close()

cancels subscription and closes stream controllers

Implementation

Future<void> close() async {
  if (_streamSubscription != null) {
    await _streamSubscription!.cancel();
  }
  await responseStream.close();
  await notificationStream.close();
}