feat(core, ui): Improve pagination invocation by using paginationEnded flag.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-09-07 17:59:56 +05:30
committed by xsahil03x
parent fd6fcef9b2
commit 21647040e1
9 changed files with 272 additions and 100 deletions
@@ -58,7 +58,7 @@ class MessageSearchListView extends StatefulWidget {
required this.filters,
this.messageQuery,
this.sortOptions,
this.paginationParams,
this.paginationParams = const PaginationParams(limit: 30),
this.messageFilters,
this.separatorBuilder,
this.itemBuilder,
@@ -93,7 +93,7 @@ class MessageSearchListView extends StatefulWidget {
/// limit: the number of users to return (max is 30)
/// offset: the offset (max is 1000)
/// message_limit: how many messages should be included to each channel
final PaginationParams? paginationParams;
final PaginationParams paginationParams;
/// The message query filters to use.
/// You can query on any of the custom fields you've defined on the [Channel].
@@ -51,7 +51,7 @@ class UserListView extends StatefulWidget {
this.filter,
this.sort,
this.presence,
this.pagination,
this.pagination = const PaginationParams(limit: 30),
this.onUserTap,
this.onUserLongPress,
this.userWidget,
@@ -93,7 +93,7 @@ class UserListView extends StatefulWidget {
/// limit: the number of users to return (max is 30)
/// offset: the offset (max is 1000)
/// message_limit: how many messages should be included to each channel
final PaginationParams? pagination;
final PaginationParams pagination;
/// Function called when tapping on a channel
/// By default it calls [Navigator.push] building a [MaterialPageRoute]