Skip to main content

LMChatReactionBottomSheet

File location
reaction_bottom_sheet.dart

LMChatReactionBottomSheet displays a bottom sheet that allows users to view and manage reactions within a conversation. Users can also remove their reactions through the provided interface.

Properties

  1. mappedReactions (Map<String, List<LMChatReactionViewData>>?)
    A map of reactions with their corresponding view data.

  2. currentUser (LMChatUserViewData)
    The user interacting with the reactions.

  3. onRemoveReaction (Function(String reaction)?)
    Callback triggered when a reaction is removed.

  4. style (LMChatReactionBottomSheetStyle?)
    Customizes the appearance of the bottom sheet.

Note: These properties are only a subset. More can be found inside the widget class.


Styling

LMChatReactionBottomSheetStyle

File location
reaction_bottom_sheet.dart

LMChatReactionBottomSheetStyle defines the visual appearance of the reaction bottom sheet, including padding, background color, and text styles.

PropertyTypeDescriptionRequiredDefault
paddingEdgeInsets?Padding inside the bottom sheetNoEdgeInsets.all(8)
backgroundColorColor?Background color of the sheetNoInherited theme
borderRadiusBorderRadius?Border radius of the sheetNo8.0

Note: These properties are only a subset. More can be found inside the style class.


Example Usage

final reactionBottomSheet = LMChatReactionBottomSheet(
mappedReactions: reactionData,
currentUser: currentUserData,
onRemoveReaction: (reaction) => print('Removed reaction: $reaction'),
style: LMChatReactionBottomSheetStyle(
padding: EdgeInsets.all(8.0),
backgroundColor: Colors.white,
borderRadius: BorderRadius.circular(8.0),
),
);