logout static method
Future<void>
logout({
- required dynamic onSuccess(
- String message
- required dynamic onError(
- CometChatException excep
Method to log out the user from CometChat
Implementation
static Future<void> logout(
{required Function(String message)? onSuccess,
required Function(CometChatException excep)? onError}) async {
try {
final result = await channel.invokeMethod('logout');
if (onSuccess != null) onSuccess(result);
} on PlatformException catch (p) {
_errorCallbackHandler(null, p, null, onError);
} catch (e) {
_errorCallbackHandler(null, null, e, onError);
}
}