usersTypingStream method Null safety

Stream<List<User>> usersTypingStream(
  1. {String? channelUrl}
)

Returns a stream to listen typing event with given channelUrl

It will be triggered for every typing event if channelUrl is not provided

Implementation

Stream<List<User>> usersTypingStream({String? channelUrl}) async* {
  if (currentUser == null) throw ConnectionRequiredError();

  await for (final res in _int.streamManager.typing.stream) {
    if (channelUrl != null) {
      if (res.channelUrl == channelUrl) yield res.getTypingUsers();
    } else {
      yield res.getTypingUsers();
    }
  }
}