LMChatBubbleContent
File location
chat_bubble_content.dart
LMChatBubbleContent
manages the main content within a chat bubble, including text, mentions, and links. It offers customization for padding, styling, and interactive tag clicks.
Properties
conversation
(LMChatConversationViewData
)
Represents the conversation being displayed.onTagTap
(Function(String tag)
)
Callback triggered when a tag is tapped.style
(LMChatBubbleContentStyle?
)
Controls the appearance of the chat bubble content.
Note: These properties are only a subset. More can be found inside the widget class. You can refer to the relevant widget class for more reference.
Styling
LMChatBubbleContentStyle
File location
chat_bubble_content.dart
LMChatBubbleContentStyle
provides customization for the appearance of the chat bubble content.
Property | Type | Description | Required | Default |
---|---|---|---|---|
visibleLines | int? | Number of visible lines | No | 6 |
textStyle | TextStyle? | Text style for the bubble text | No | Font size 14, weight 400 |
padding | EdgeInsets? | Padding inside the bubble | No | EdgeInsets.zero |
Note: These properties are only a subset. More can be found inside the style class. You can refer to the relevant style class for more reference.
Example Usage
final customChatBubble = LMChatBubbleContent(
conversation: conversationData,
onTagTap: (tag) => print('Tag tapped: $tag'),
style: LMChatBubbleContentStyle(
textStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
padding: EdgeInsets.all(8.0),
animation: true,
),
);