Merge pull request #103 from GetStream/feature/separatorBuilder
Feature/separator builder
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
## 0.2.10
|
||||
|
||||
- Update llc dependency
|
||||
- Add `separatorBuilder` to `ChannelListView`
|
||||
|
||||
## 0.2.9+1
|
||||
|
||||
- Update llc dependency
|
||||
|
||||
@@ -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<ChannelListView>
|
||||
|
||||
Widget _itemBuilder(context, int i, List<Channel> channels) {
|
||||
if (i % 2 != 0) {
|
||||
if (widget.separatorBuilder != null) {
|
||||
return widget.separatorBuilder(context, i);
|
||||
}
|
||||
return _separatorBuilder(context, i);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user