@@ -33,7 +33,6 @@ class ChatGroupedListWidget extends StatefulWidget {
3333 const ChatGroupedListWidget ({
3434 Key ? key,
3535 required this .showPopUp,
36- required this .showTypingIndicator,
3736 required this .scrollController,
3837 required this .chatBackgroundConfig,
3938 required this .replyMessage,
@@ -52,8 +51,7 @@ class ChatGroupedListWidget extends StatefulWidget {
5251 /// Allow user to swipe to see time while reaction pop is not open.
5352 final bool showPopUp;
5453
55- /// Allow user to show typing indicator.
56- final bool showTypingIndicator;
54+ /// Pass scroll controller
5755 final ScrollController scrollController;
5856
5957 /// Allow user to give customisation to background of chat
@@ -103,8 +101,6 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
103101
104102 bool get showPopUp => widget.showPopUp;
105103
106- bool get showTypingIndicator => widget.showTypingIndicator;
107-
108104 bool highlightMessage = false ;
109105 final ValueNotifier <String ?> _replyId = ValueNotifier (null );
110106
@@ -184,7 +180,6 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
184180 reverse: true ,
185181 // When reaction popup is being appeared at that user should not scroll.
186182 physics: showPopUp ? const NeverScrollableScrollPhysics () : null ,
187- padding: EdgeInsets .only (bottom: showTypingIndicator ? 50 : 0 ),
188183 controller: widget.scrollController,
189184 child: Column (
190185 mainAxisSize: MainAxisSize .min,
@@ -210,23 +205,19 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
210205 )
211206 : _chatStreamBuilder,
212207 ),
213- widget.showTypingIndicator
214- ? TypingIndicator (
215- typeIndicatorConfig: widget.typeIndicatorConfig,
216- chatBubbleConfig: chatBubbleConfig? .inComingChatBubbleConfig,
217- showIndicator: widget.showTypingIndicator,
218- )
219- : ValueListenableBuilder (
220- valueListenable: ChatViewInheritedWidget .of (context)!
221- .chatController
222- .typingIndicatorNotifier,
223- builder: (context, value, child) => TypingIndicator (
208+ ValueListenableBuilder (
209+ valueListenable: ChatViewInheritedWidget .of (context)!
210+ .chatController
211+ .typingIndicatorNotifier,
212+ builder: (context, value, child) => value
213+ ? TypingIndicator (
224214 typeIndicatorConfig: widget.typeIndicatorConfig,
225215 chatBubbleConfig:
226216 chatBubbleConfig? .inComingChatBubbleConfig,
227217 showIndicator: value,
228- ),
229- ),
218+ )
219+ : Container (),
220+ ),
230221 Flexible (
231222 child: Align (
232223 alignment: suggestionsListConfig.axisAlignment.alignment,
0 commit comments