Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
Rendering issue in attached image preview when sending message on web.
* **Feat**: [420](https://github.com/SimformSolutionsPvtLtd/chatview/pull/420) Added support for
`playerMode` in `VoiceMessageConfiguration` with `single` and `multi`.
* **Feat**: [434](https://github.com/SimformSolutionsPvtLtd/chatview/pull/434) Add optional
`boxShadow` to `ChatBubble` and apply it in `TextMessageView` when set.

## [3.0.0]

Expand Down
7 changes: 7 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,13 @@ class _ExampleOneChatScreenState extends State<ExampleOneChatScreen> {
receiptsWidgetConfig: ReceiptsWidgetConfig(
showReceiptsIn: ShowReceiptsIn.lastMessage,
),
boxShadow: [
BoxShadow(
color: Color(0x40000000),
blurRadius: 10,
offset: Offset(0, 2),
),
],
),
inComingChatBubbleConfig: ChatBubble(
linkPreviewConfig: LinkPreviewConfiguration(
Expand Down
6 changes: 6 additions & 0 deletions lib/src/models/chat_bubble.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class ChatBubble {
this.onMessageRead,
this.border,
this.textSelectionConfig,
this.boxShadow,
});

/// Used for giving color of chat bubble.
Expand Down Expand Up @@ -75,4 +76,9 @@ class ChatBubble {

/// Configuration for text selection behavior and appearance.
final TextSelectionConfig? textSelectionConfig;

/// Optional shadow(s) drawn under the chat bubble.
///
/// When null, no shadow is applied (default behavior).
final List<BoxShadow>? boxShadow;
}
3 changes: 3 additions & 0 deletions lib/src/widgets/text_message_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class TextMessageView extends StatelessWidget {
color: highlightMessage ? highlightColor : _color,
border: border,
borderRadius: _borderRadius(textMessage),
boxShadow: isMessageBySender
? outgoingChatBubbleConfig?.boxShadow
: inComingChatBubbleConfig?.boxShadow,
),
child: isSelectable
? CustomSelectionArea(
Expand Down
Loading