getTableRows method

Future<List<Map<String, dynamic>>> getTableRows(
  1. String code,
  2. String scope,
  3. String table, {
  4. bool json = true,
  5. String tableKey = '',
  6. String lower = '',
  7. String upper = '',
  8. int indexPosition = 1,
  9. String keyType = '',
  10. int limit = 10,
  11. bool reverse = false,
})

Get table rows (eosio get table ...)

Implementation

Future<List<Map<String, dynamic>>> getTableRows(
  String code,
  String scope,
  String table, {
  bool json = true,
  String tableKey = '',
  String lower = '',
  String upper = '',
  int indexPosition = 1,
  String keyType = '',
  int limit = 10,
  bool reverse = false,
}) async {
  dynamic result = await this._post('/chain/get_table_rows', {
    'json': json,
    'code': code,
    'scope': scope,
    'table': table,
    'table_key': tableKey,
    'lower_bound': lower,
    'upper_bound': upper,
    'index_position': indexPosition,
    'key_type': keyType,
    'limit': limit,
    'reverse': reverse,
  });
  if (result is Map) {
    return result['rows'].cast<Map<String, dynamic>>();
  }
  return [];
}