deleteGroup static method
Future<void>
deleteGroup(
- String guid, {
- required dynamic onSuccess(
- String message
- required dynamic onError(
- CometChatException excep
In order to delete a group.
The user must be an Admin of the group they are trying to delete.
guid
A unique identifier for a group that logged in user wants to delete.
method could throw PlatformException with error codes specifying the cause
Implementation
static Future<void> deleteGroup(String guid,
{required Function(String message)? onSuccess,
required Function(CometChatException excep)? onError}) async {
try {
var result = await channel.invokeMethod('deleteGroup', {
'guid': guid,
});
if (onSuccess != null) onSuccess(result);
} on PlatformException catch (p) {
_errorCallbackHandler(null, p, null, onError);
} catch (e) {
_errorCallbackHandler(null, null, e, onError);
}
}