kickAllDevices method
Forces the specified account to log out from all devices.
Param userId
The account you want to force to log out from all the devices.
Param pwdOrToken
The password or token.
Param isPwd
Whether a password or token is used: (Default)true
: A password is used; false
: A token is used.
Throws A description of the exception. See ChatError.
Implementation
Future<void> kickAllDevices({
required String userId,
required String pwdOrToken,
bool isPwd = true,
}) async {
Map req = {'username': userId, 'password': pwdOrToken, 'isPwd': isPwd};
Map result =
await ClientChannel.invokeMethod(ChatMethodKeys.kickAllDevices, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}