From 94c4db0c803be6980266fc61cadee8a3c892afbe Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 29 Apr 2022 09:38:43 +0200 Subject: [PATCH] StreamChannelHeader --- ...l_header.mdx => stream_channel_header.mdx} | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) rename docusaurus/docs/Flutter/stream_chat_flutter/{channel_header.mdx => stream_channel_header.mdx} (74%) diff --git a/docusaurus/docs/Flutter/stream_chat_flutter/channel_header.mdx b/docusaurus/docs/Flutter/stream_chat_flutter/stream_channel_header.mdx similarity index 74% rename from docusaurus/docs/Flutter/stream_chat_flutter/channel_header.mdx rename to docusaurus/docs/Flutter/stream_chat_flutter/stream_channel_header.mdx index bf65a863..bc3c8aaf 100644 --- a/docusaurus/docs/Flutter/stream_chat_flutter/channel_header.mdx +++ b/docusaurus/docs/Flutter/stream_chat_flutter/stream_channel_header.mdx @@ -1,12 +1,12 @@ --- -id: channel_header +id: stream_channel_header sidebar_position: 10 -title: ChannelHeader +title: StreamChannelHeader --- A Widget To Display Common Channel Details -Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelHeader-class.html) +Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelHeader-class.html) ![](../assets/channel_header.png) @@ -17,28 +17,28 @@ be in the form of a channel name or the users in the channel. Along with that, t a way for the user to look at more details of the channel (media, pinned messages, actions, etc.) and preferably also a way to navigate back to where they came from. -To encapsulate all of this functionality into one widget, the Flutter SDK contains a `ChannelHeader` +To encapsulate all of this functionality into one widget, the Flutter SDK contains a `StreamChannelHeader` widget which provides these out of the box. ### Basic Example -Let's just add a `ChannelHeader` to a page with a `MessageListView` and a `MessageInput` to display +Let's just add a `StreamChannelHeader` to a page with a `StreamMessageListView` and a `StreamMessageInput` to display and send messages. ```dart class ChannelPage extends StatelessWidget { const ChannelPage({ - Key? key, + Key key, }) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( - appBar: ChannelHeader(), + appBar: StreaChannelHeader(), body: Column( children: [ Expanded( - child: MessageListView( + child: StreamMessageListView( threadBuilder: (_, parentMessage) { return ThreadPage( parent: parentMessage, @@ -46,7 +46,7 @@ class ChannelPage extends StatelessWidget { }, ), ), - MessageInput(), + StreamMessageInput(), ], ), ); @@ -62,7 +62,7 @@ Use the `title`, `subtitle`, `leading`, or `actions` parameters to substitute th ```dart //... -ChannelHeader( +StreamChannelHeader( title: Text('My Custom Name'), ), ``` @@ -71,14 +71,14 @@ ChannelHeader( ### Showing Connection State -The `ChannelHeader` can also display connection state below the tile which shows the user if they +The `StreamChannelHeader` can also display connection state below the tile which shows the user if they are connected or offline, etc. on connection events. To enable this, use the `showConnectionStateTile` property. ```dart //... -ChannelHeader( +StreamChannelHeader( showConnectionStateTile: true, ), ```