add onLongPress to channel preview
This commit is contained in:
@@ -55,6 +55,7 @@ class ChannelListView extends StatefulWidget {
|
||||
this.sort,
|
||||
this.pagination,
|
||||
this.onChannelTap,
|
||||
this.onChannelLongPress,
|
||||
this.channelWidget,
|
||||
this.channelPreviewBuilder,
|
||||
this.errorBuilder,
|
||||
@@ -92,6 +93,9 @@ class ChannelListView extends StatefulWidget {
|
||||
/// with the widget [channelWidget] as child.
|
||||
final ChannelTapCallback onChannelTap;
|
||||
|
||||
/// Function called when long pressing on a channel
|
||||
final Function(Channel) onChannelLongPress;
|
||||
|
||||
/// Widget used when opening a channel
|
||||
final Widget channelWidget;
|
||||
|
||||
@@ -271,6 +275,7 @@ class _ChannelListViewState extends State<ChannelListView>
|
||||
);
|
||||
} else {
|
||||
child = ChannelPreview(
|
||||
onLongPress: widget.onChannelLongPress,
|
||||
channel: channel,
|
||||
onImageTap: widget.onImageTap != null
|
||||
? () {
|
||||
|
||||
Reference in New Issue
Block a user