I don't understand how to call scrollToMessage or scrollToIndex #835
-
I don't understand how to call scrollToMessage or scrollToIndex, i can see the api design but i still dont get why this mixin existing on the api but i cant do _chatController.scrollToMessage |
Beta Was this translation helpful? Give feedback.
Answered by
demchenkoalex
Jul 19, 2025
Replies: 1 comment 1 reply
-
I believe this mixin supposed to make the chatController able to scroll? but i can't |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry missed this post. There is ScrollToMessageMixin exported from
flutter_chat_core
. The way you use it - if you have a custom chat controller (implements ChatController), you can also addwith ScrollToMessageMixin
there, and calldisposeScrollMethods
in your controller'sdispose
method. You can find it in the example here as well.If you use provided InMemoryChatController it's already included.
Now if you use that controller of yours with your Chat widget
chatController: _chatController,
, you can callscrollToMessage
orscrollToIndex
on it.If you use
chatAnimatedListBuilder
, you need to use ChatAnimatedList or ChatAnimatedListReversed since they implement that logic, if you build you…