getIntrinsicRowHeight method
Gets the row height to fit the row based on the DataGridCell.value. For header cells, it considers the GridColumn.columnName.
You can set the canIncludeHiddenColumns
argument as true to consider the
hidden columns also in auto size calculation. If you want to exclude any
column, you can use excludedColumn
argument.
You can override ColumnSizer.computeHeaderCellHeight or ColumnSizer.computeCellHeight methods to perform the custom calculation for height. If you want to calculate the height based on different TextStyle, you can override these methods and call the super method with the required TextStyle. Also, set the custom ColumnSizer to SfDataGrid.columnSizer property.
The auto size is calculated based on default TextStyle of the datagrid.
Implementation
double getIntrinsicRowHeight(int rowIndex,
{bool canIncludeHiddenColumns = false,
List<String> excludedColumns = const <String>[]}) {
return getAutoFitRowHeight(_columnSizer, rowIndex,
canIncludeHiddenColumns: canIncludeHiddenColumns,
excludedColumns: excludedColumns);
}