add channelheader doc

This commit is contained in:
Salvatore Giordano
2020-03-02 13:29:52 +01:00
parent 4c6f796c11
commit b8c72bc8f6
7 changed files with 39 additions and 14 deletions
+2
View File
@@ -58,3 +58,5 @@ doc/api/
*.js_ *.js_
*.js.deps *.js.deps
*.js.map *.js.map
fvm
+4
View File
@@ -1,3 +1,7 @@
## 0.1.6
- Add some documentation
## 0.1.5 ## 0.1.5
- Fix channels pagination - Fix channels pagination
+12 -13
View File
@@ -41,25 +41,24 @@ You should then run `flutter packages get`
We provide 2 Widgets dedicated to business logic and state management: We provide 2 Widgets dedicated to business logic and state management:
- `StreamChat` - [StreamChat](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChat-class.html)
- `StreamChannel` - [StreamChannel](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannel-class.html)
### UI Components ### UI Components
These are the available Widgets that you can use to build your application UI. These are the available Widgets that you can use to build your application UI.
Every widget uses the `StreamChat` or `StreamChannel` widgets to manage the state and communicate with Stream services. Every widget uses the `StreamChat` or `StreamChannel` widgets to manage the state and communicate with Stream services.
- `ChannelHeader` - [ChannelHeader](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelHeader-class.html)
- `ChannelImage` - [ChannelImage](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelImage-class.html)
- `ChannelListView` - [ChannelListView](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelListView-class.html)
- `ChannelName` - [ChannelName](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelName-class.html)
- `ChannelPreview` - [ChannelPreview](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelPreview-class.html)
- `MessageInput` - [MessageInput](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/MessageInput-class.html)
- `MessageListView` - [MessageListView](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/MessageListView-class.html)
- `MessageWidget` - [MessageWidget](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/MessageWidget-class.html)
- `StreamChatTheme` - [StreamChatTheme](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChatTheme-class.html)
- `ThreadHeader` - [ThreadHeader](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ThreadHeader-class.html)
### Customizing styles ### Customizing styles
+2
View File
@@ -35,3 +35,5 @@ lib/generated_plugin_registrant.dart
# Exceptions to above rules. # Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
fvm
+18
View File
@@ -8,6 +8,24 @@ import './channel_name.dart';
import 'channel_image.dart'; import 'channel_image.dart';
import 'stream_channel.dart'; import 'stream_channel.dart';
/// Channel header
///
/// [screenshot](https://github.com/GetStream/stream-chat-flutter/blob/master/screenshots/channel_header.png)
///
/// Usually you would use this widget as an [AppBar] inside a [Scaffold].
/// However you can also use it as a normal widget.
///
/// It shows the current [Channel] information.
///
/// Make sure to have a [StreamChannel] ancestor in order to provide the information about the channel.
/// Every part of the widget uses a [StreamBuilder] to render the channel information as soon as it updates.
///
/// By default the widget shows a backButton that calls [Navigator.pop].
/// You can disable this button using the [showBackButton] property of just override the behaviour
/// with [onBackPressed].
///
/// The widget components render the ui based on the first ancestor of type [StreamChatTheme] and on its [ChannelTheme.channelHeaderTheme] property.
/// Modify it to change the widget appearance.
class ChannelHeader extends StatelessWidget implements PreferredSizeWidget { class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
final bool showBackButton; final bool showBackButton;
final VoidCallback onBackPressed; final VoidCallback onBackPressed;
+1 -1
View File
@@ -1,7 +1,7 @@
name: stream_chat_flutter name: stream_chat_flutter
homepage: https://github.com/GetStream/stream-chat-flutter homepage: https://github.com/GetStream/stream-chat-flutter
description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter. description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter.
version: 0.1.5 version: 0.1.6
environment: environment:
sdk: ">=2.1.0 <3.0.0" sdk: ">=2.1.0 <3.0.0"
Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB