addSubComment method
dynamic
addSubComment(
{
- required int mainCommentId,
})
Implementation
addSubComment(
{required String comment, required int mainCommentId, String? postId}) {
var reuslt = SubCommentDTO(
postId: '$postId',
commentedBy: "Sub Comment User",
userId: "XXXXX-001",
userDispalyName: "KM",
commentedDate: DateTime.now(),
comment: comment,
commentImgUrl: [],
commentLikeCounts: getEmojiesForLike(),
likesUsers: [],
tagTo: '@${replyTo}');
listOfComments[mainCommentId].replies.add(reuslt);
}