getContentView method

Widget getContentView(
  1. CustomMessage customMessage,
  2. CometChatTheme theme,
  3. BuildContext context
)

Implementation

Widget getContentView(
    CustomMessage customMessage, CometChatTheme theme, BuildContext context) {
  if (customMessage.deletedAt != null) {
    return super.getDeleteMessageBubble(customMessage, theme);
  }
  return CometChatPollsBubble(
    loggedInUser: loggedInUser?.uid,
    theme: configuration?.theme ?? theme,
    choosePoll: choosePoll,
    senderUid: customMessage.sender?.uid,
    pollQuestion: customMessage.customData?["question"] ?? "",
    pollId: customMessage.customData?["id"],
    metadata: getPollsResult(customMessage),
    style: configuration?.pollsBubbleStyle,
  );
}