Skip to main content

Text Bubble

CometChatTextBubble is the content view shown for TextMessage.

PropertiesTypeDescription
textStringthe text to display
styleTextBubbleStyleused to customize appearance of this widget
themeThemeused to set custom theme
alignmentBubbleAlignmentalignment can be left, right or center

TextBubbleStyle

TextBubbleStyle is the class containing attributes to customize appearance of this widget.

PropertiesTypeDescription
textStyleTextStyleused to set style of the text of the message
heightdoubleused to set height
widthdoubleused to set width
backgroundColorused to set background color
gradientGradientused to set a gradient background
borderBoxBorderused to set border
borderRadiusdoubleused to set border radius

Usage

CometChatTextBubble(
text:'Hi! how are you?',
alignment: BubbleAlignment.right,
theme: cometChatTheme,
style: TextBubbleStyle(background: Colors.teal),
);