expandReplies method

Future<void> expandReplies(
  1. String commentId
)

Implementation

Future<void> expandReplies(String commentId) async {
  final index = _comments.indexWhere((c) => c.id == commentId);
  if (index != -1) {
    final replies = await controller.getReplies(commentId, 1);
    _comments[index] = _comments[index].copyWith(replies: replies);
    _replyPageByComment[commentId] = 1;
    notifyListeners();
  }
}