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 ChatDeviceInfo#resource}.
Throws A description of the exception. See {@link ChatError}.
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 {
ChatError.hasErrorFromResult(result);
return result.boolValue(ChatMethodKeys.kickDevice);
} on ChatError catch (e) {
throw e;
}
}