CometChatTransferOwnership
is a Widget that allows the current owner or administrator of a group to transfer the ownership rights and administrative control of that group to another user. By transferring ownership, the original owner can designate a new user as the group owner, giving them full control and administrative privileges over the group.
CometChatTransferOwnership
is a Widget that allows the current owner or administrator of a group to transfer the ownership rights and administrative control of that group to another user. By transferring ownership, the original owner can designate a new user as the group owner, giving them full control and administrative privileges over the group.
Here are some key points regarding the transfer ownership feature in CometChat:
Widgets | Description |
---|---|
CometchatGroupMembers | CometChatGroupMembers is an independent widget designed to create a user-friendly screen for browsing and managing group members. Users can effortlessly search for specific members and transfer ownership |
CometChatListItem | This widget renders information extracted from a User object onto a tile, featuring a title, subtitle, leading view, and trailing view. |
CometChatTransferOwnership
, as a composed of the CometChatGroupMembers, offers flexible integration options, allowing it to be launched directly via button clicks or any user-triggered action. Additionally, it seamlessly integrates into activity and Fragment. With transfer ownership, users gain access to a wide range of parameters and methods for effortless customization of its user interface.
You can launch CometChatTransferOwnership
directly using Navigator.push
, or you can define it as a widget within the build
method of your State
class.
CometChatTransferOwnership
CometChatTransferOwnership
as a Widget in the build MethodonBack
feature. This capability allows you to customize the behavior associated with navigating back within your app. Utilize the provided code snippet to override default behaviors and tailor the user experience according to your specific requirements.
onError
and improve error handling.
GroupMembersRequestBuilder
. This feature allows you to create more specific and targeted queries when fetching groups. The following are the parameters available in GroupMembersRequestBuilder
Property | Description | Code |
---|---|---|
Guid | Group ID for the group whose members are to be fetched | guid: String |
Limit | Sets the number of members that can be fetched in a single request, suitable for pagination | limit: int? |
Search Keyword | Keyword for searching | searchKeyword: String? |
Scopes | Used for fetching group members based on multiple scopes | scopes: List<String>? |
GroupMembersRequestBuilder
. This feature allows you to keep uniformity between the displayed Group Members List and searched Group Members List.
Example
This feature allows you to keep uniformity between the displayed Members list and searched Members.
Example
Widget
. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
Events emitted by the Join Group widget is as follows.
Event | Description |
---|---|
ccOwnershipChanged | Triggers when the ownership of a group member is changed successfully |
TransferOwnershipStyle
Property | Description | Code |
---|---|---|
Member Scope Style | Used to customize the appearance of the text in trailing widget | memberScopeStyle: TextStyle? |
Submit Icon Tint | Will override the color of the default selection complete icon | submitIconTint: Color? |
Select Icon Tint | Will override the color of the default selection icon | selectIconTint: Color? |
Avatar
Widget in the Banned Members Widget, you can use the following code snippet. For further insights on Avatar
Styles refer
CometChatTransferOwnership
Widget, You can use the following code snippet. For further insights on Status Indicator Styles refer
ListItemStyle
in the CometChatTransferOwnership
Widget, you can use the following code snippet. For further insights on List Item
Styles refer
GroupMembersStyle
to the Transfer Ownership Widget to customize the styling, you can use the following code snippet. For further insights on GroupMembers
Styles refer
CometChatTransferOwnership
Property | Description | Code |
---|---|---|
Back Button | Back button widget | backButton: Widget? |
Disable Users Presence | Controls visibility of status indicator | disableUsersPresence: bool? |
Empty State Text | Text to be displayed when the list is empty | emptyStateText: String? |
Error State Text | Text to be displayed when error occur | errorStateText: String? |
Group | Stores a reference to the group for which the ownership is being transferred | group: Group |
Hide Search | Switch on/off search input | hideSearch: bool? |
Hide Separator | Toggle visibility of separator | hideSeparator: bool? |
Search Box Icon | Search icon widget | searchBoxIcon: Widget? |
Search Placeholder | Placeholder text of search input | searchPlaceholder: String? |
Select Icon | Will override the default selection icon | selectIcon: Widget? |
Show Back Button | Switch on/off back button | showBackButton: bool? |
Submit Icon | Will override the default selection complete icon | submitIcon: Widget? |
Theme | Can pass custom theme | theme: CometChatTheme? |
Title | Sets title for the list | title: String? |
CometChatTransferOwnership
Widget.
custom_list_item.dart
for more complex or unique list items.
EmptyStateView
using emptyStateView
to match the error widget of your app.
loadingStateView
to match the loading UI of your app.
ErrorStateView
using errorStateView
to match the error UI of your app.