feat: Added new docs

This commit is contained in:
Deven Joshi
2021-06-28 16:48:58 +05:30
parent 0e1ed9b66f
commit f43c14dd5d
4 changed files with 166 additions and 2 deletions
@@ -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].