isMemberOfGroup static method

Future<bool?> isMemberOfGroup({
  1. required String userJid,
  2. required String groupJid,
})

Checks if a user is a member of a group.

This method checks whether the specified user is a member 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 with true if the user is a member, false otherwise.

Usage example:

Mirrorfly.isMemberOfGroup(userJid: userJid, groupJid: groupJid).then((isMember) {
  // Handle the result
  if (isMember == true) {
    print("User is a member of the group");
  } else {
    print("User is not a member of the group");
  }
});

Implementation

static Future<bool?> isMemberOfGroup(
    {required String userJid, required String groupJid}) {
  return FlyChatFlutterPlatform.instance.isMemberOfGroup(groupJid, userJid);
}