build method

StaggeredGridTile build(
  1. LayoutSize layoutSize
)

Implementation

StaggeredGridTile build(LayoutSize layoutSize) {
  if (mainAxisCellCount != null) {
    return StaggeredGridTile.count(
      crossAxisCellCount: crossAxisCellCount.get(layoutSize),
      mainAxisCellCount: mainAxisCellCount!.get(layoutSize).toInt(),
      child: child,
    );
  }

  if (mainAxisExtent != null) {
    return StaggeredGridTile.extent(
      crossAxisCellCount: crossAxisCellCount.get(layoutSize),
      mainAxisExtent: mainAxisExtent!.get(layoutSize),
      child: child,
    );
  }

  return StaggeredGridTile.fit(
    crossAxisCellCount: crossAxisCellCount.get(layoutSize),
    child: child,
  );
}