dispose method

void dispose()

Call this method to dispose this object

Implementation

void dispose() {
  cancelEventSubscription();
  _currentUserController.close();
  _unreadChannelsController.close();
  _totalUnreadCountController.close();

  final channels = this.channels.values.toList();
  for (final channel in channels) {
    channel.dispose();
  }
  _channelsController.close();
}