makeAdmin static method
Future<void>
makeAdmin({
- required String groupJid,
- required String userJid,
- required dynamic flyCallBack(
- FlyResponse response
Makes a user an admin of a group.
This method promotes a user to be an admin of the specified group.
Params:
groupJid
: The JID of the group.userJid
: The JID of the user to be made admin.
Returns:
flyCallBack
: A callback function that is called with the response.
Usage example:
Mirrorfly.makeAdmin(
groupJid: groupJid,
userJid: userJid,
flyCallBack: (response) {
// Handle the response
print("User made admin: $response");
},
);
Implementation
static Future<void> makeAdmin(
{required String groupJid,
required String userJid,
required Function(FlyResponse response) flyCallBack}) {
return FlyChatFlutterPlatform.instance
.makeAdmin(groupJid, userJid, flyCallBack);
}