From 11ad0150cea1583a8536cbe90eb6fb84e099bf14 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Thu, 6 Jan 2022 17:00:18 +0530 Subject: [PATCH] added bottom sheet capabilities --- .../stream_chat_flutter/lib/src/channel_bottom_sheet.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/channel_bottom_sheet.dart b/packages/stream_chat_flutter/lib/src/channel_bottom_sheet.dart index 74661c08..92726939 100644 --- a/packages/stream_chat_flutter/lib/src/channel_bottom_sheet.dart +++ b/packages/stream_chat_flutter/lib/src/channel_bottom_sheet.dart @@ -155,7 +155,9 @@ class _ChannelBottomSheetState extends State { title: context.translations.viewInfoLabel, onTap: widget.onViewInfoTap, ), - if (!channel.isDistinct) + if (!channel.isDistinct && + channel.ownCapabilities + .contains(PermissionType.leaveChannel)) OptionListTile( leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 16), @@ -174,7 +176,9 @@ class _ChannelBottomSheetState extends State { }); }, ), - if (isOwner) + if (isOwner && + channel.ownCapabilities + .contains(PermissionType.deleteChannel)) OptionListTile( leading: Padding( padding: const EdgeInsets.symmetric(horizontal: 16),