feat: Added new docs
This commit is contained in:
@@ -4,3 +4,40 @@ sidebar_position: 5
|
||||
title: MessageListView
|
||||
---
|
||||
|
||||
The MessageListView shows the list of messages of the current channel.
|
||||
|
||||
```dart
|
||||
class ChannelPage extends StatelessWidget {
|
||||
const ChannelPage({
|
||||
Key key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: ChannelHeader(),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: MessageListView(
|
||||
threadBuilder: (_, parentMessage) {
|
||||
return ThreadPage(
|
||||
parent: parentMessage,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
MessageInput(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Make sure to have a [StreamChannel] ancestor in order to
|
||||
provide the information about the channels.
|
||||
The widget uses a [ListView.custom] to render the list of channels.
|
||||
|
||||
The widget components render the ui based on the first
|
||||
ancestor of type [StreamChatTheme].
|
||||
Reference in New Issue
Block a user