getRowsPerPage method

dynamic getRowsPerPage(
  1. dynamic tableInfo,
  2. dynamic context
)

Implementation

getRowsPerPage(tableInfo, context) {
  myLogAll('getRowsPerPage');
  //int lines = ((MediaQuery.of(context).size.height - 600) / 150).round() * 5;
  int lines =
      ((MediaQuery.of(context).size.height - 410) / gTableMaxHeight).round();

  /*if (lines < 5) {
    lines = 10;
  }
  if (lines > 50) {
    lines = 50;
  }*/

  if (tableInfo[gRowsPerPage] == null) {
    tableInfo[gRowsPerPage] = lines;
  }

  return tableInfo[gRowsPerPage];
}