logoutOfChatSDK static method
Logs the user out of the Mirrorfly chat SDK.
This static method sends a request to the Mirrorfly chat SDK to logout
the current user. It returns a Future that completes with a bool value,
indicating whether the logout operation was successful (true
) or not (false
).
Returns:
The flyCallBack
parameter is a function that will be called upon completion of the operation.
It receives a FlyResponse object as a parameter, which contains information about the success or failure of the operation.
Example:
Mirrorfly.logoutOfChatSDK(flyCallBack: (response){
if(response.isSuccess){
print('User logged out of Mirrorfly chat SDK.');
}else{
print('Failed to logout of Mirrorfly chat SDK.');
}
});
Implementation
static Future<void> logoutOfChatSDK(
{required Function(FlyResponse response) flyCallBack}) {
return FlyChatFlutterPlatform.instance.logoutOfChatSDK(flyCallBack);
}