kickDevice method

Future<void> kickDevice({
  1. required String userId,
  2. required String token,
  3. required String resource,
})

~english Forces the specified account to log out from one device by token. ~end

~chinese 使用 Token 将指定账号的一个设备踢下线。 ~end

Implementation

Future<void> kickDevice({
  required String userId,
  required String token,
  required String resource,
}) async {
  try {
    Map req = {'userId': userId, 'token': token, 'resource': resource};
    Map result = await platform_interface.Client.instance.callNativeMethod(
      ChatMethodKeys.kickDevice,
      req,
    );
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}