Skip to main content
Version: v4

Update a Group

Update Group

In other words, as a group owner, how can I update the group details?

You can update the existing details of the group using the updateGroup() method.

String GUID = "GUID";
String groupName = "Hello Group!";
String groupType = CometChatGroupType.public;
String password = "";

Group _group = Group(guid: GUID, name: groupName, type: groupType);


await CometChat.updateGroup(group: _group, onSuccess: (Group group ){
debugPrint("Group Created Successfully : $group ");
}, onError:(CometChatException e) {
debugPrint("Group Creation failed with exception: ${e.message}");
} );

This method takes an instance of the Group class as a parameter which should contain the data that you wish to update.

ParameterDescription
groupan instance of class Group

After the successful update of the group, you will receive an instance of Group class containing updated information of the group.

For more information on the Group class, please check here