getTableRow method

Future<Map<String, dynamic>?> getTableRow(
  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. bool reverse = false,
})

Get table row (AMAX get table ...)

Implementation

Future<Map<String, dynamic>?> getTableRow(
  String code,
  String scope,
  String table, {
  bool json = true,
  String tableKey = '',
  String lower = '',
  String upper = '',
  int indexPosition = 1,
  String keyType = '',
  bool reverse = false,
}) async {
  var rows = await getTableRows(
    code,
    scope,
    table,
    json: json,
    tableKey: tableKey,
    lower: lower,
    upper: upper,
    indexPosition: indexPosition,
    keyType: keyType,
    limit: 1,
    reverse: reverse,
  );

  return rows.length > 0 ? rows[0] : null;
}