ActivityFeed.fromComment constructor

ActivityFeed.fromComment({
  1. required PostComment comment,
  2. required ActivityFeedType type,
  3. AppProfile? fromProfile,
  4. String? mediaUrl,
})

Implementation

ActivityFeed.fromComment({required PostComment comment, required ActivityFeedType type,
  AppProfile? fromProfile, String? mediaUrl}) :
      id = '',
      ownerId = comment.ownerId,
      activityReferenceId = comment.postId,
      mediaUrl = mediaUrl ?? comment.mediaUrl,
      profileId = fromProfile?.id ?? comment.ownerId,
      profileName = fromProfile?.name ?? comment.ownerName,
      profileImgUrl = fromProfile?.photoUrl ?? comment.ownerImgUrl,
      activityFeedType = type,
      createdTime = DateTime.now().millisecondsSinceEpoch,
      message = comment.text,
      unread = true;