getAllContactsFromServer method
- @Deprecated('Use fetchAllContactIds instead.')
Gets all the contact ids from the server.
Return The list of contact ids.
Throws A description of the exception. See ChatError.
Implementation
@Deprecated('Use fetchAllContactIds instead.')
///
/// Gets all the contact ids from the server.
///
/// **Return** The list of contact ids.
///
/// **Throws** A description of the exception. See [ChatError].
///
///
///
Future<List<String>> getAllContactsFromServer() async {
try {
Map result = await platform_interface.Client.instance.contactManager
.callNativeMethod(ChatMethodKeys.getAllContactsFromServer);
ChatError.hasErrorFromResult(result);
List<String> list = [];
result[ChatMethodKeys.getAllContactsFromServer]?.forEach((element) {
if (element is String) {
list.add(element);
}
});
return list;
} catch (e) {
rethrow;
}
}