-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unnecessary Rebuilds #80
Comments
I figured out the problem,
Since the I tried removing GestureDetector(
onHorizontalDragUpdate: (details) => isEnableSwipeToSeeTime
? showPopUp
? null
: _onHorizontalDrag(details)
: null,
onHorizontalDragEnd: (details) => isEnableSwipeToSeeTime
? showPopUp
? null
: _animationController?.reverse()
: null,
onTap: widget.onChatListTap,
child: Column(
children: [
Flexible(
child: _animationController != null
? AnimatedBuilder(
animation: _animationController!,
builder: (context, child) {
return _chatStreamBuilder;
},
)
: _chatStreamBuilder,
),
TypingIndicator(
typeIndicatorConfig: widget.typeIndicatorConfig,
chatBubbleConfig: chatBubbleConfig?.inComingChatBubbleConfig,
showIndicator: showTypingIndicator,
profilePic: profileCircleConfig?.profileImageUrl,
),
SizedBox(
height: MediaQuery.of(context).size.width *
(widget.replyMessage.message.isNotEmpty ? 0.3 : 0.14),
),
],
),
);
- physics: const NeverScrollableScrollPhysics(),
+ controller: widget.scrollController,
+scrollController.position.maxScrollExtent, After making these changes guess what, it worked nicely. NoteUsing this method performance can be improved until an extent but, scrollingToReplyMessages will take a lot of time because |
@Yogesh-Dubey-Ayesavi Thanks for pointing out these issues. We had planned for this performance improvement, but you suggested some changes, I will try those and give feedback on this |
This issue is stale because it has been open for 30 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
I just added to
debugPrint('${widget.message.id} rebuilt');
to MessageView build method .The logs i obtained then.
a0e30af0-daa0-46fa-a1f8-54af63a743ac.mp4
Each message even which are outside the viewPort are getting rebuilt, that causes huge memory consumption.
The text was updated successfully, but these errors were encountered: