unblockUser static method
Future<void>
unblockUser({
- required String userJid,
- required dynamic flyCallBack(
- FlyResponse response
This method sends a request to unblock 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 unblocked.
Returns:
flyCallBack
- A callback function that is called with a FlyResponse object upon completion.
Example usage:
await Mirrorfly.unblockUser(
userJid: "user123@example.com",
flyCallBack: (response) {
if (response.isSuccess) {
print("User unblocked successfully");
} else {
print("Failed to unblock user: ${response.errorMessage}");
}
},
);
Implementation
/// [flyCallBack] - A callback function that is called with a [FlyResponse] object upon completion.
///
/// Example usage:
/// ```dart
/// await Mirrorfly.unblockUser(
/// userJid: "user123@example.com",
/// flyCallBack: (response) {
/// if (response.isSuccess) {
/// print("User unblocked successfully");
/// } else {
/// print("Failed to unblock user: ${response.errorMessage}");
/// }
/// },
/// );
/// ```
static Future<void> unblockUser(
{required String userJid,
required Function(FlyResponse response) flyCallBack}) {
return FlyChatFlutterPlatform.instance.unblockUser(userJid, flyCallBack);
}