fetchPresenceStatus method

Future<List<ChatPresence>> fetchPresenceStatus(
  1. {required List<String> members}

Gets the current presence state of users.

Param members The array of IDs of users whose current presence state you want to check.

Return Which contains the users whose presence state you have subscribed to.

Throws A description of the exception. See ChatError.


Future<List<ChatPresence>> fetchPresenceStatus({
  required List<String> members,
}) async {
  Map req = {'members': members};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.fetchPresenceStatus, req);
  try {
    List<ChatPresence> list = [];
    result[ChatMethodKeys.fetchPresenceStatus]?.forEach((element) {
    return list;
  } on ChatError catch (e) {
    throw e;