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
mappedReactions
(Map<String, List<LMChatReactionViewData>>?
)
A map of reactions with their corresponding view data.currentUser
(LMChatUserViewData
)
The user interacting with the reactions.onRemoveReaction
(Function(String reaction)?
)
Callback triggered when a reaction is removed.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.
Property | Type | Description | Required | Default |
---|---|---|---|---|
padding | EdgeInsets? | Padding inside the bottom sheet | No | EdgeInsets.all(8) |
backgroundColor | Color? | Background color of the sheet | No | Inherited theme |
borderRadius | BorderRadius? | Border radius of the sheet | No | 8.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),
),
);