fetchComments method

Future<List<Comment>> fetchComments(
  1. String entityId
)

Fetches comments for a specific entity.

Returns a list of root comments (comments without a parent). Replies are not included in this list; use getReplies to fetch them.

entityId is the identifier of the entity (e.g., post, article) for which to fetch comments.

Returns an empty list if no comments are found.

Implementation

Future<List<Comment>> fetchComments(String entityId) async {
  return await service.fetchComments(entityId, config, 1);
}