Skip to main content

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

  1. conversation (LMChatConversationViewData)
    Represents the conversation being displayed.

  2. onTagTap (Function(String tag))
    Callback triggered when a tag is tapped.

  3. 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.

PropertyTypeDescriptionRequiredDefault
visibleLinesint?Number of visible linesNo6
textStyleTextStyle?Text style for the bubble textNoFont size 14, weight 400
paddingEdgeInsets?Padding inside the bubbleNoEdgeInsets.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,
),
);