queryReferendums method

Future<List<ReferendumInfo>> queryReferendums(
  1. String address
)

Implementation

Future<List<ReferendumInfo>> queryReferendums(String address) async {
  final List data = await service.queryReferendums(address);
  if (data.length > 0) {
    return data
        .map((e) => ReferendumInfo.fromJson(Map<String, dynamic>.of(e)))
        .toList();
  }
  return [];
}