getReplies method

Future<CommentsList?> getReplies(
  1. Comment comment
)

Implementation

Future<CommentsList?> getReplies(Comment comment) async {
  if (comment.continuation == null) {
    return null;
  }

  final page =
      await re.CommentsClient.getReplies(_httpClient, comment.continuation!);

  if (page == null || page.comments == null) {
    return null;
  }

  return CommentsList(
      page.comments!
          .map((e) => Comment(
              e.author,
              ChannelId(e.channelId),
              e.text,
              e.likeCount ?? 0,
              e.publishTime,
              e.repliesCount ?? 0,
              e.isHearted,
              e.continuation))
          .toList(growable: false),
      0,
      page,
      _httpClient);
}