vote property

VoteState vote

Has the currently authenticated User voted on this UserContent.

Returns VoteState.upvoted if the content has been upvoted, VoteState.downvoted if it has been downvoted, and VoteState.none otherwise.

Implementation

VoteState get vote {
  if (data!['likes'] == null) {
    return VoteState.none;
  } else if (data!['likes']) {
    return VoteState.upvoted;
  } else {
    return VoteState.downvoted;
  }
}