diff --git a/lib/src/chat_theme.dart b/lib/src/chat_theme.dart index 6d237f35..e7547acc 100644 --- a/lib/src/chat_theme.dart +++ b/lib/src/chat_theme.dart @@ -61,6 +61,7 @@ abstract class ChatTheme { required this.backgroundColor, this.bubbleMargin, required this.dateDividerMargin, + required this.chatContentMargin, required this.dateDividerTextStyle, required this.deliveredIcon, required this.documentIcon, @@ -132,6 +133,9 @@ abstract class ChatTheme { /// Margin around date dividers. final EdgeInsets dateDividerMargin; + /// Margin inside chat area. + final EdgeInsets chatContentMargin; + /// Text style of the date dividers. final TextStyle dateDividerTextStyle; @@ -325,6 +329,9 @@ class DefaultChatTheme extends ChatTheme { bottom: 32, top: 16, ), + super.chatContentMargin = const EdgeInsets.only( + bottom: 4, + ), super.dateDividerTextStyle = const TextStyle( color: neutral2, fontSize: 12, @@ -499,6 +506,9 @@ class DarkChatTheme extends ChatTheme { bottom: 32, top: 16, ), + super.chatContentMargin = const EdgeInsets.only( + bottom: 4, + ), super.dateDividerTextStyle = const TextStyle( color: neutral7, fontSize: 12, diff --git a/lib/src/widgets/chat_list.dart b/lib/src/widgets/chat_list.dart index 4115514a..f9c89976 100644 --- a/lib/src/widgets/chat_list.dart +++ b/lib/src/widgets/chat_list.dart @@ -296,7 +296,7 @@ class _ChatListState extends State ), ), SliverPadding( - padding: const EdgeInsets.only(bottom: 4), + padding: InheritedChatTheme.of(context).theme.chatContentMargin, sliver: SliverAnimatedList( findChildIndexCallback: (Key key) { if (key is ValueKey) {