diff --git a/CHANGELOG.md b/CHANGELOG.md index 5190ca384..86c4c6239 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.10 + +- Update llc dependency +- Add `separatorBuilder` to `ChannelListView` + ## 0.2.9+1 - Update llc dependency diff --git a/lib/src/channel_list_view.dart b/lib/src/channel_list_view.dart index 74a0cb92a..ba71e8543 100644 --- a/lib/src/channel_list_view.dart +++ b/lib/src/channel_list_view.dart @@ -61,6 +61,7 @@ class ChannelListView extends StatefulWidget { this.onChannelLongPress, this.channelWidget, this.channelPreviewBuilder, + this.separatorBuilder, this.errorBuilder, this.onImageTap, this.pullToRefresh = true, @@ -106,6 +107,9 @@ class ChannelListView extends StatefulWidget { /// Builder used to create a custom channel preview final ChannelPreviewBuilder channelPreviewBuilder; + /// Builder used to create a custom item separator + final Function(BuildContext, int) separatorBuilder; + /// The function called when the image is tapped final Function(Channel) onImageTap; @@ -266,6 +270,9 @@ class _ChannelListViewState extends State Widget _itemBuilder(context, int i, List channels) { if (i % 2 != 0) { + if (widget.separatorBuilder != null) { + return widget.separatorBuilder(context, i); + } return _separatorBuilder(context, i); } diff --git a/pubspec.yaml b/pubspec.yaml index 0b5e34f67..f2deb2f86 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.2.9+1 +version: 0.2.10 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues @@ -23,7 +23,7 @@ dependencies: file_picker: ^2.0.0 image_picker: ^0.6.7+2 flutter_keyboard_visibility: ^3.2.1 - stream_chat: ^0.2.7+1 + stream_chat: ^0.2.8 mime: ^0.9.6+3 visibility_detector: ^0.1.5 http_parser: ^3.1.4