getBlockIds method
Gets the block ids from the local database.
Return The block list obtained from the local database.
Throws A description of the exception. See ChatError.
Implementation
Future<List<String>> getBlockIds() async {
try {
Map result = await platform_interface.Client.instance.contactManager
.callNativeMethod(ChatMethodKeys.getBlockListFromDB);
ChatError.hasErrorFromResult(result);
List<String> list = [];
result[ChatMethodKeys.getBlockListFromDB]?.forEach((element) {
if (element is String) {
list.add(element);
}
});
return list;
} catch (e) {
rethrow;
}
}