LMChatBubble class
The chat bubble widget. This widget is used to display the chat bubble.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- LMChatBubble
Constructors
-
LMChatBubble({Key? key, required LMChatConversationViewData conversation, required LMChatUserViewData currentUser, required LMChatUserViewData conversationUser, required dynamic onTagTap(String tag), LMChatAudioHandler? audioHandler, List<
LMChatReactionViewData> ? reactions, Map<int, LMChatUserViewData> ? userMeta, dynamic onRemoveReaction(String reaction)?, List<LMChatAttachmentViewData> ? attachments, LMChatBubbleStyle? style, Widget contentBuilder(BuildContext context, LMChatBubbleContent content)?, dynamic onReply(LMChatConversationViewData)?, LMChatIcon? replyIcon, LMChatProfilePicture? avatar, LMChatProfilePictureBuilder? avatarBuilder, bool? isSent, LMChatText? deletedText, bool isSelected = false, bool? isDM, dynamic onTap(bool isSelected, State<LMChatBubble> state)?, void onMediaTap()?, dynamic onLongPress(bool isSelected, State<LMChatBubble> state)?, bool isSelectableOnTap()?, Widget headerBuilder(BuildContext context, LMChatBubbleHeader header)?, Widget deletedTextBuilder(BuildContext context, LMChatText text)?, Widget mediaBuilder(BuildContext context, List<LMChatAttachmentViewData> ? attachments, LMChatBubbleMedia media)?, dynamic onReaction(String reaction)?, Widget linkPreviewBuilder(LMChatOGTagsViewData ogTags, LMChatLinkPreview oldLinkPreviewWidget)?, LMChatPoll? poll, LMChatPollBuilder? pollBuilder, Widget bubbleReactionsBuilder(List<LMChatReactionViewData> reactions, LMChatBubbleReactions oldWidget)?, Widget reactionBarBuilder(LMChatReactionBar oldWidget)?, dynamic replyBuilder(LMChatConversationViewData reply, LMChatBubbleReply oldWidget)?, VoidCallback? onReactionsTap, VoidCallback? onReplyTap, LMChatConversationActionInterface? actionHelper, Widget chatBubbleContainerBuilder(BuildContext context, Widget container)?}) -
The LMChatBubble widget constructor.
used to display the chat bubble.
const
Properties
- actionHelper → LMChatConversationActionInterface?
-
The action helper for the chat bubble
final
-
attachments
→ List<
LMChatAttachmentViewData> ? -
The list of attachments for this chat bubble
final
- audioHandler → LMChatAudioHandler?
-
Instance of LMChatAudioHandler to manage audio playback seamlessly
final
- avatar → LMChatProfilePicture?
-
The avatar of the user.
final
- avatarBuilder → LMChatProfilePictureBuilder?
-
The avatar builder for the user.
final
-
bubbleReactionsBuilder
→ Widget Function(List<
LMChatReactionViewData> reactions, LMChatBubbleReactions oldWidget)? -
Builder for bubble reactions
final
- chatBubbleContainerBuilder → Widget Function(BuildContext context, Widget container)?
-
final
- contentBuilder → Widget Function(BuildContext context, LMChatBubbleContent content)?
-
The content builder.
final
- conversation → LMChatConversationViewData
-
LMChatConversationViewData is data of the conversation.
final
- conversationUser → LMChatUserViewData
-
The user of the conversation.
final
- currentUser → LMChatUserViewData
-
The current user.
final
- deletedText → LMChatText?
-
The deleted text.
final
- deletedTextBuilder → Widget Function(BuildContext context, LMChatText text)?
-
The deleted text builder.
final
-
The footer builder.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerBuilder → Widget Function(BuildContext context, LMChatBubbleHeader header)?
-
The header builder.
final
- isDM → bool?
-
bool to check whether a message is a DM message
final
- isSelectableOnTap → bool Function()?
-
The function to call when the bubble is selectable on tap.
final
- isSelected → bool
-
The selected state of the bubble.
final
- isSent → bool?
-
is the message sent by the current user.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- linkPreviewBuilder → Widget Function(LMChatOGTagsViewData ogTags, LMChatLinkPreview oldLinkPreviewWidget)?
-
The Link Preview widget builder.s
final
-
mediaBuilder
→ Widget Function(BuildContext context, List<
LMChatAttachmentViewData> ? attachments, LMChatBubbleMedia media)? -
The media builder.
final
-
onLongPress
→ dynamic Function(bool isSelected, State<
LMChatBubble> state)? -
The function to call when the bubble is long pressed.
final
- onMediaTap → void Function()?
-
The function to call when the bubble media is tapped.
final
- onReaction → dynamic Function(String reaction)?
-
The function to call when a reaction is made.
final
- onReactionsTap → VoidCallback?
-
Callback for catching when reactions are tapped
final
- onRemoveReaction → dynamic Function(String reaction)?
-
The function to call when a reaction is removed from bottom sheet.
final
- onReply → dynamic Function(LMChatConversationViewData)?
-
The function to call when a reply is made.
final
- onReplyTap → VoidCallback?
-
Callback for reply tap
final
- onTagTap → dynamic Function(String tag)
-
The function to call when a tag is tapped.
final
-
onTap
→ dynamic Function(bool isSelected, State<
LMChatBubble> state)? -
The function to call when the bubble is tapped.
final
- poll → LMChatPoll?
-
Poll Widget
final
- pollBuilder → LMChatPollBuilder?
-
Poll Widget builder
final
- reactionBarBuilder → Widget Function(LMChatReactionBar oldWidget)?
-
Builder for reactions bar on chat bubble
final
-
reactions
→ List<
LMChatReactionViewData> ? -
The list of attachments for this chat bubble
final
- replyBuilder → dynamic Function(LMChatConversationViewData reply, LMChatBubbleReply oldWidget)?
-
The builder function to build a reply widget
final
- replyIcon → LMChatIcon?
-
The reply icon.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → LMChatBubbleStyle?
-
The style of the bubble.
final
-
userMeta
→ Map<
int, LMChatUserViewData> ? -
The user meta for this chat bubble
final
Methods
-
copyWith(
{LMChatConversationViewData? conversation, LMChatUserViewData? currentUser, LMChatUserViewData? conversationUser, List< LMChatAttachmentViewData> ? attachments, List<LMChatReactionViewData> ? reactions, Map<int, LMChatUserViewData> ? userMeta, bool? isSent, LMChatIcon? replyIcon, LMChatProfilePicture? avatar, LMChatProfilePictureBuilder? avatarBuilder, dynamic onReply(LMChatConversationViewData)?, dynamic onTagTap(String tag)?, LMChatText? deletedText, LMChatBubbleStyle? style, bool? isSelected, dynamic onTap(bool isSelected, State<LMChatBubble> state)?, void onMediaTap()?, dynamic onLongPress(bool isSelected, State<LMChatBubble> state)?, bool isSelectableOnTap()?, Widget headerBuilder(BuildContext context, LMChatBubbleHeader header)?, Widget contentBuilder(BuildContext context, LMChatBubbleContent content)?, Widget deletedTextBuilder(BuildContext context, LMChatText text)?, bool? isDM, Widget mediaBuilder(BuildContext context, List<LMChatAttachmentViewData> ? attachments, LMChatBubbleMedia media)?, dynamic onReaction(String reaction)?, dynamic onRemoveReaction(String reaction)?, dynamic replyBuilder(LMChatConversationViewData reply, LMChatBubbleReply oldWidget)?, Widget linkPreviewBuilder(LMChatOGTagsViewData ogTags, LMChatLinkPreview oldLinkPreviewWidget)?, Widget bubbleReactionsBuilder(List<LMChatReactionViewData> reactions, LMChatBubbleReactions oldWidget)?, Widget reactionBarBuilder(LMChatReactionBar oldWidget)?, VoidCallback? onReactionsTap, LMChatPoll? poll, LMChatPollBuilder? pollBuilder, LMChatAudioHandler? audioHandler, VoidCallback? onReplyTap, LMChatConversationActionInterface? actionHelper, Widget chatBubbleContainerBuilder(BuildContext context, Widget container)?}) → LMChatBubble - Creates a copy of this LMChatBubble but with the given fields replaced with the new values. If the new values are null, then the old values are used.
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< LMChatBubble> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited