rows property

List<PlutoRow> rows
final

rows contains a call to the PlutoGridStateManager.initializeRows method that handles necessary settings when creating a grid or when a new row is added.

CPU operation is required as much as rows.length multiplied by the number of PlutoRow.cells. No problem under normal circumstances, but if there are many rows and columns, the UI may freeze at the start of the grid. In this case, the grid is started by passing an empty list to rows and after the PlutoGrid.onLoaded callback is called Rows initialization can be done asynchronously with PlutoGridStateManager.initializeRowsAsync .

stateManager.setShowLoading(true);

PlutoGridStateManager.initializeRowsAsync(
  columns,
  fetchedRows,
).then((value) {
  stateManager.refRows.addAll(value);

  /// In this example,
  /// the loading screen is activated in the onLoaded callback when the grid is created.
  /// If the loading screen is not activated
  /// You must update the grid state by calling the stateManager.notifyListeners() method.
  /// Because calling setShowLoading updates the grid state
  /// No need to call stateManager.notifyListeners.
  stateManager.setShowLoading(false);
});

Implementation

final List<PlutoRow> rows;