blockUsers
and unblockUsers
methods with a simple UI.
appID
, region
, authKey
)lib/messages.dart
)Component | Role |
---|---|
CometChatUserInfo | Displays user profile with block/unblock controls |
CometChatUIKit.blockUsers([...]) | SDK method to block specified user(s) |
CometChatUIKit.unblockUsers([...]) | SDK method to unblock specified user(s) |
ElevatedButton | Flutter widget for block/unblock actions |
sample_app/lib/messages/messages.dart
sample_app/lib/user_info/cometchat_user_info.dart
sample_app/lib/user_info/cometchat_user_info.dart
ElevatedButton.styleFrom(...)
to customize colors, padding, and shape.user.blockedByMe
state.showDialog
for “Are you sure?” prompts.user.uid == loggedInUser.uid
.ScaffoldMessenger
.sample_app/lib/group_info/cometchat_group_info.dart
methods like removeMembers
and banMembers
.
Feature | File | Method |
---|---|---|
Open User Info | sample_app/lib/messages/messages.dart | Navigator.push(...) |
Block User | sample_app/lib/user_info/cometchat_user_info.dart | CometChatUIKit.blockUsers([...]) |
Unblock User | sample_app/lib/user_info/cometchat_user_info.dart | CometChatUIKit.unblockUsers([...]) |
Group Management | sample_app/lib/group_info/cometchat_group_info.dart | Group-related actions (not blocking) |