LazyLoadScrollView
This commit is contained in:
@@ -31,7 +31,6 @@ Controllers are used to handle the business logic of the chat. You can use them
|
||||
* StreamUserListController
|
||||
* StreamMessageSearchListController
|
||||
* StreamMessageInputController
|
||||
* MessageListController
|
||||
* LazyLoadScrollView
|
||||
* PagedValueListenableBuilder
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
id: lazy_load_scroll_view
|
||||
sidebar_position: 8
|
||||
title: LazyLoadScrollView
|
||||
---
|
||||
|
||||
A Widget For Building A Paginated List
|
||||
|
||||
Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter_core/latest/stream_chat_flutter_core/LazyLoadScrollView-class.html)
|
||||
|
||||
### Background
|
||||
|
||||
The `LazyLoadScrollView` is a widget that helps you build a paginated list.
|
||||
It provides callbacks to notify you when the list has been scrolled to the bottom and when the list has been scrolled to the top and other necessary callbacks.
|
||||
|
||||
#### Callbacks
|
||||
|
||||
* onStartOfPage: called when the list has been scrolled to the top of the page.
|
||||
|
||||
* onEndOfPage: called when the list has been scrolled to the bottom of the page.
|
||||
|
||||
* onPageScrollStart: called when the scroll of the list starts.
|
||||
|
||||
* onPageScrollEnd: called when the scroll of the list ends.
|
||||
|
||||
* onInBetweenOfPage: called when the list is not either at the top nor at the bottom of the page.
|
||||
|
||||
### Basic Example
|
||||
|
||||
Building a paginated list is a very common task. Here is an example of how to use the `LazyLoadScrollView` to build a simple list with pagination.
|
||||
|
||||
```dart
|
||||
LazyLoadScrollView(
|
||||
onEndOfPage: _paginateData,
|
||||
/// The child could be any widget which dispatches [ScrollNotification]s.
|
||||
/// For example [ListView], [GridView] or [CustomScrollView].
|
||||
child: ListView.builder(
|
||||
itemBuilder: ((context, index) => _buildListTile),
|
||||
),
|
||||
)
|
||||
```
|
||||
@@ -6,6 +6,8 @@ title: MessageListCore
|
||||
|
||||
A Widget For Building A List Of Messages
|
||||
|
||||
Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter_core/latest/stream_chat_flutter_core/MessageListCore-class.html)
|
||||
|
||||
### Background
|
||||
|
||||
The UI SDK of Stream Chat supplies a `MessageListView` class that builds a list of channels fetching
|
||||
|
||||
@@ -6,6 +6,8 @@ title: StreamChannelListController
|
||||
|
||||
A Widget For Controlling A List Of Channels
|
||||
|
||||
Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter_core/latest/stream_chat_flutter_core/StreamChannelListController-class.html)
|
||||
|
||||
### Background
|
||||
|
||||
The `StreamChannelListController` is a controller class that allows you to control a list of channels.
|
||||
|
||||
@@ -7,6 +7,8 @@ title: StreamChatCore
|
||||
`StreamChatCore` is a version of `StreamChat` found in `stream_chat_flutter` that is decoupled from
|
||||
theme and initialisations.
|
||||
|
||||
Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter_core/latest/stream_chat_flutter_core/StreamChatCore-class.html)
|
||||
|
||||
`StreamChatCore` is used to provide information about the chat client to the widget tree.
|
||||
This Widget is used to react to life cycle changes and system updates.
|
||||
When the app goes into the background, the websocket connection is automatically closed and when it goes back to foreground the connection is opened again.
|
||||
|
||||
@@ -6,6 +6,8 @@ title: StreamMessageInputController
|
||||
|
||||
A Widget For Controlling A Message Input
|
||||
|
||||
Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter_core/latest/stream_chat_flutter_core/StreamMessageInputController-class.html)
|
||||
|
||||
### Background
|
||||
|
||||
The `StreamMessageInputController` is a controller class that embed the business logic to compose a message.
|
||||
|
||||
+2
@@ -6,6 +6,8 @@ title: StreamMessageSearchListController
|
||||
|
||||
A Widget For Controlling A List Of Searched Messages
|
||||
|
||||
Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter_core/latest/stream_chat_flutter_core/StreamMessageSearchListController-class.html)
|
||||
|
||||
### Background
|
||||
|
||||
The `StreamMessageSearchListController` is a controller class that allows you to control a list of searched messages.
|
||||
|
||||
@@ -6,6 +6,8 @@ title: StreamUserListController
|
||||
|
||||
A Widget For Controlling A List Of Users
|
||||
|
||||
Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter_core/latest/stream_chat_flutter_core/StreamUserListController-class.html)
|
||||
|
||||
### Background
|
||||
|
||||
The `StreamUserListController` is a controller class that allows you to control a list of users.
|
||||
|
||||
Reference in New Issue
Block a user