getBlockListFromDB method
Gets the block list 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>> getBlockListFromDB() async {
Map result = await _channel.invokeMethod(ChatMethodKeys.getBlockListFromDB);
try {
ChatError.hasErrorFromResult(result);
List<String> list = [];
result[ChatMethodKeys.getBlockListFromDB]?.forEach((element) {
if (element is String) {
list.add(element);
}
});
return list;
} on ChatError catch (e) {
throw e;
}
}