getAllContactIds method
Gets the contact ids from the local database.
Return The contact ids.
Throws A description of the exception. See ChatError.
Implementation
Future<List<String>> getAllContactIds() async {
Map result = await _channel.invokeMethod(
ChatMethodKeys.getAllContactsFromDB,
);
try {
ChatError.hasErrorFromResult(result);
List<String> list = [];
result[ChatMethodKeys.getAllContactsFromDB]?.forEach((element) {
if (element is String) {
list.add(element);
}
});
return list;
} on ChatError catch (e) {
throw e;
}
}