Merge branch 'develop' into feat/reverseMessageListView

This commit is contained in:
Sahil Kumar
2021-07-22 15:35:40 +05:30
committed by GitHub
7 changed files with 54 additions and 14 deletions
@@ -167,6 +167,7 @@ class MessageListView extends StatefulWidget {
this.threadSeparatorBuilder,
this.messageListController,
this.reverse = true,
this.paginationLimit = 20,
}) : super(key: key);
/// Function used to build a custom message widget
@@ -178,6 +179,9 @@ class MessageListView extends StatefulWidget {
///
/// See [ScrollView.reverse].
final bool reverse;
/// Limit used during pagination
final int paginationLimit;
/// Function used to build a custom system message widget
final SystemMessageBuilder? systemMessageBuilder;
@@ -336,6 +340,7 @@ class _MessageListViewState extends State<MessageListView> {
@override
Widget build(BuildContext context) => MessageListCore(
paginationLimit: widget.paginationLimit,
messageFilter: widget.messageFilter,
loadingBuilder: widget.loadingBuilder ??
(context) => const Center(
@@ -664,7 +669,9 @@ class _MessageListViewState extends State<MessageListView> {
);
Future<void> _paginateData(
StreamChannelState? channel, QueryDirection direction) =>
StreamChannelState? channel,
QueryDirection direction,
) =>
_messageListController.paginateData!(direction: direction);
int? _getTopElementIndex(Iterable<ItemPosition> values) {