isGroupAdmin static method
Checks if a user is an admin of a group.
This method checks whether the specified user is an admin of the specified group.
Params:
userJid
: The JID of the user to check.groupJid
: The JID of the group.
Returns:
- A
Future<bool?>
that completes withtrue
if the user is an admin,false
otherwise.
Usage example:
Mirrorfly.isGroupAdmin(userJid: userJid, groupJid: groupJid).then((isAdmin) {
// Handle the result
if (isAdmin == true) {
print("User is an admin of the group");
} else {
print("User is not an admin of the group");
}
});
Implementation
static Future<bool?> isGroupAdmin(
{required String userJid, required String groupJid}) {
return FlyChatFlutterPlatform.instance.isAdmin(userJid, groupJid);
}