getGroup static method
Future<Group?>
getGroup(
- String guid, {
- required dynamic onSuccess(
- Group retGrou
- required dynamic onError(
- CometChatException excep
Retrieve information for a specific group
guid
guid of group
method could throw PlatformException with error codes specifying the cause
Implementation
static Future<Group?> getGroup(String guid,
{required Function(Group retGrou)? onSuccess,
required Function(CometChatException excep)? onError}) async {
try {
final result = await channel.invokeMethod('getGroup', {
'guid': guid,
});
final Group res = Group.fromMap(result);
if (onSuccess != null) onSuccess(res);
return res;
} on PlatformException catch (p) {
_errorCallbackHandler(null, p, null, onError);
} catch (e) {
_errorCallbackHandler(null, null, e, onError);
}
return null;
}