@@ -33,7 +33,6 @@ class ChatGroupedListWidget extends StatefulWidget {
33
33
const ChatGroupedListWidget ({
34
34
Key ? key,
35
35
required this .showPopUp,
36
- required this .showTypingIndicator,
37
36
required this .scrollController,
38
37
required this .chatBackgroundConfig,
39
38
required this .replyMessage,
@@ -52,8 +51,7 @@ class ChatGroupedListWidget extends StatefulWidget {
52
51
/// Allow user to swipe to see time while reaction pop is not open.
53
52
final bool showPopUp;
54
53
55
- /// Allow user to show typing indicator.
56
- final bool showTypingIndicator;
54
+ /// Pass scroll controller
57
55
final ScrollController scrollController;
58
56
59
57
/// Allow user to give customisation to background of chat
@@ -103,8 +101,6 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
103
101
104
102
bool get showPopUp => widget.showPopUp;
105
103
106
- bool get showTypingIndicator => widget.showTypingIndicator;
107
-
108
104
bool highlightMessage = false ;
109
105
final ValueNotifier <String ?> _replyId = ValueNotifier (null );
110
106
@@ -184,7 +180,6 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
184
180
reverse: true ,
185
181
// When reaction popup is being appeared at that user should not scroll.
186
182
physics: showPopUp ? const NeverScrollableScrollPhysics () : null ,
187
- padding: EdgeInsets .only (bottom: showTypingIndicator ? 50 : 0 ),
188
183
controller: widget.scrollController,
189
184
child: Column (
190
185
mainAxisSize: MainAxisSize .min,
@@ -210,23 +205,19 @@ class _ChatGroupedListWidgetState extends State<ChatGroupedListWidget>
210
205
)
211
206
: _chatStreamBuilder,
212
207
),
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 (
224
214
typeIndicatorConfig: widget.typeIndicatorConfig,
225
215
chatBubbleConfig:
226
216
chatBubbleConfig? .inComingChatBubbleConfig,
227
217
showIndicator: value,
228
- ),
229
- ),
218
+ )
219
+ : Container (),
220
+ ),
230
221
Flexible (
231
222
child: Align (
232
223
alignment: suggestionsListConfig.axisAlignment.alignment,
0 commit comments