queryAssetsBalances method

Future<List<AssetsBalanceData>> queryAssetsBalances(
  1. List<String> ids,
  2. String address
)

Implementation

Future<List<AssetsBalanceData>> queryAssetsBalances(
    List<String> ids, String address) async {
  final res = await service.queryAssetsBalances(ids, address);

  return res
      .asMap()
      .map((k, v) {
        final e = v ?? {};
        e['id'] = ids[k];
        return MapEntry(k,
            v != null ? AssetsBalanceData.fromJson(e) : AssetsBalanceData());
      })
      .values
      .toList();
}