kickDevice method Null safety
Forces the specified account to log out from the specified device.
Param username
The account you want to force logout.
Param password
The account's password.
Param resource
The device ID. For how to fetch the device ID, ee {@link EMDeviceInfo#resource}.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<bool> kickDevice(
{required String username,
required String password,
required String resource}) async {
EMLog.v('kickDevice: $username, "******"');
Map req = {
'username': username,
'password': password,
'resource': resource
};
Map result = await _channel.invokeMethod(ChatMethodKeys.kickDevice, req);
try {
EMError.hasErrorFromResult(result);
return result.boolValue(ChatMethodKeys.kickDevice);
} on EMError catch (e) {
throw e;
}
}