getBlackList static method
获取黑名单列表
Implementation
static Future<List<NIMUser>> getBlackList() async {
var blackAccounts = await NimCore.instance.userService.getBlackList();
if (blackAccounts.isSuccess && blackAccounts.data != null) {
var userList = Stream.fromIterable(blackAccounts.data!)
.asyncMap((e) => NimCore.instance.userService
.getUserInfo(e)
.then((value) => value.data!))
.toList();
return userList;
} else {
return List.empty();
}
}