kickDevice method Null safety
Forces the specified account to log out from the specified device.
Param userId 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, See ChatDeviceInfo.resource.
Throws A description of the exception. See ChatError.
Implementation
Future<bool> kickDevice(
{required String userId,
required String password,
required String resource}) async {
EMLog.v('kickDevice: $userId, "******"');
Map req = {'username': userId, 'password': password, 'resource': resource};
Map result =
await ClientChannel.invokeMethod(ChatMethodKeys.kickDevice, req);
try {
ChatError.hasErrorFromResult(result);
return result.boolValue(ChatMethodKeys.kickDevice);
} on ChatError catch (e) {
throw e;
}
}