diff --git a/.gitignore b/.gitignore index 2ea557c4..28b825a6 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,5 @@ doc/api/ *.js_ *.js.deps *.js.map + +fvm \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 564083ac..90cce589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.6 + +- Add some documentation + ## 0.1.5 - Fix channels pagination diff --git a/README.md b/README.md index e770051e..187148d7 100644 --- a/README.md +++ b/README.md @@ -41,25 +41,24 @@ You should then run `flutter packages get` We provide 2 Widgets dedicated to business logic and state management: -- `StreamChat` -- `StreamChannel` +- [StreamChat](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChat-class.html) +- [StreamChannel](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannel-class.html) ### UI Components 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. -- `ChannelHeader` -- `ChannelImage` -- `ChannelListView` -- `ChannelName` -- `ChannelPreview` -- `MessageInput` -- `MessageListView` -- `MessageWidget` -- `StreamChatTheme` -- `ThreadHeader` - +- [ChannelHeader](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelHeader-class.html) +- [ChannelImage](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelImage-class.html) +- [ChannelListView](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelListView-class.html) +- [ChannelName](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelName-class.html) +- [ChannelPreview](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ChannelPreview-class.html) +- [MessageInput](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/MessageInput-class.html) +- [MessageListView](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/MessageListView-class.html) +- [MessageWidget](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/MessageWidget-class.html) +- [StreamChatTheme](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChatTheme-class.html) +- [ThreadHeader](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/ThreadHeader-class.html) ### Customizing styles diff --git a/example/.gitignore b/example/.gitignore index ae1f1838..8011d84b 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -35,3 +35,5 @@ lib/generated_plugin_registrant.dart # Exceptions to above rules. !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages + +fvm \ No newline at end of file diff --git a/lib/src/channel_header.dart b/lib/src/channel_header.dart index 4e8532ae..dccb80ca 100644 --- a/lib/src/channel_header.dart +++ b/lib/src/channel_header.dart @@ -8,6 +8,24 @@ import './channel_name.dart'; import 'channel_image.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 { final bool showBackButton; final VoidCallback onBackPressed; diff --git a/pubspec.yaml b/pubspec.yaml index 613aa924..2a458f3c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: 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. -version: 0.1.5 +version: 0.1.6 environment: sdk: ">=2.1.0 <3.0.0" diff --git a/screenshots/channel_header.png b/screenshots/channel_header.png new file mode 100644 index 00000000..e59a9cc7 Binary files /dev/null and b/screenshots/channel_header.png differ