getBlockedConversationList static method
Future<void>
getBlockedConversationList(
- List<int> conversationTypeList,
- dynamic finished(
- List? convertionList,
- int? code
)?
)
获取设置免打扰的会话列表
conversationTypeList
会话类型数组,参见枚举 RCConversationType
finished
回调结果,code 为 0 代表正常
Implementation
static Future<void> getBlockedConversationList(List<int> conversationTypeList, Function(List? /*<Conversation>*/ convertionList, int? code)? finished) async {
Map map = {"conversationTypeList": conversationTypeList};
Map conversationMap = await _channel.invokeMethod(RCMethodKey.GetBlockedConversationList, map);
List? conversationList = conversationMap["conversationList"];
if (conversationList == null) {
if (finished != null) {
finished(null, conversationMap["code"]);
}
return;
}
List conList = [];
for (String conStr in conversationList) {
Conversation? con = MessageFactory.instance!.string2Conversation(conStr);
conList.add(con);
}
if (finished != null) {
finished(conList, conversationMap["code"]);
}
}