Please select which package this feature is related to
stream_chat_flutter
Which platforms would this feature impact?
iOS
Is your feature request related to a problem?
No response
Describe the solution that you'd like
add a parameter to customize the duration of scrolling to bottom in function scrollToBottomDefaultTapAction
Future<void> scrollToBottomDefaultTapAction(int unreadCount) async {
this.unreadCount = unreadCount;
if (unreadCount > 0) {
streamChannel!.channel.markRead();
}
// If the channel is not up to date, we need to reload it before scrolling
// to the end of the list.
if (!_upToDate) {
// Reset the pagination variables.
initialIndex = 0;
initialAlignment = 0;
_bottomPaginationActive = false;
// Reload the channel to get the latest messages.
await streamChannel!.reloadChannel();
// Wait for the frame to be rendered with the updated channel state.
await WidgetsBinding.instance.endOfFrame;
}
// Scroll to the end of the list.
if (_scrollController?.isAttached == true) {
_scrollController!.scrollTo(
index: 0,
duration: const Duration(seconds: **customizedDuration**),
curve: Curves.easeInOut,
);
}
}
Describe alternatives that you have considered
We can pass our own scrollToBottomTapAction to solve this, but there are so many other functions in the default tap action, and it's hard to override and maintain them, such as the controller, and some private variables. Currently the scrolling speed is too slow, so could you help to add a parameter to customize this duration? It would be helpful, thanks.
Additional context
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Please select which package this feature is related to
stream_chat_flutter
Which platforms would this feature impact?
iOS
Is your feature request related to a problem?
No response
Describe the solution that you'd like
add a parameter to customize the duration of scrolling to bottom in function scrollToBottomDefaultTapAction
Describe alternatives that you have considered
We can pass our own scrollToBottomTapAction to solve this, but there are so many other functions in the default tap action, and it's hard to override and maintain them, such as the controller, and some private variables. Currently the scrolling speed is too slow, so could you help to add a parameter to customize this duration? It would be helpful, thanks.
Additional context
No response
Code of Conduct