minIntrinsicSize method

  1. @override
double minIntrinsicSize(
  1. TrackType type,
  2. Iterable<RenderBox> items, {
  3. double crossAxisSizeForItem(
    1. RenderBox
    )?,
})
override

The smallest width (for columns) or height (for rows) that a track can have.

The type argument indicates whether this track represents a row or a column.

The items argument is an iterable that provides all the items in the grid for this track. Walking the items is by definition O(N), so algorithms that do that should be considered expensive.

The measurementAxisMaxSize argument is the maxWidth or maxHeight of the incoming constraints for grid, and might be infinite.

The crossAxisSizeForItem will be provided to assist in calculations if the cross axis sizing is known.

Implementation

@override
double minIntrinsicSize(
  TrackType type,
  Iterable<RenderBox> items, {
  double Function(RenderBox)? crossAxisSizeForItem,
}) {
  return sizeInPx;
}