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