blockUser static method

Future<void> blockUser({
  1. required String userJid,
  2. required dynamic flyCallBack(
    1. FlyResponse response
    ),
})

This method sends a request to block a user identified by userJid. Upon completion, the flyCallBack function is invoked with a FlyResponse object, which contains information about the success or failure of the operation.

Parameters: userJid - The JID (Jabber ID) of the user to be blocked.

Returns: flyCallBack - A callback function that is called with a FlyResponse object upon completion.

Example usage:

await Mirrorfly.blockUser(
  userJid: "user123@example.com",
  flyCallBack: (response) {
    if (response.isSuccess) {
      print("User blocked successfully");
    } else {
      print("Failed to block user: ${response.errorMessage}");
    }
  },
);

Implementation

static Future<void> blockUser(
    {required String userJid,
    required Function(FlyResponse response) flyCallBack}) {
  return FlyChatFlutterPlatform.instance.blockUser(userJid, flyCallBack);
}