getBlackList static method

Future<List<NIMUser>> getBlackList()

获取黑名单列表

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();
  }
}