concept SliverGrid in category flutter

appears as: SliverGrid, The SliverGrid
Flutter in Action

This is an excerpt from Manning's book Flutter in Action.

Listing 9.15. StreamBuilder displays data that constantly changes
// e_commerce/lib/widget/catalog.dart -- line ~66
List<Widget> _buildSlivers(BuildContext context) {
    if (slivers.isNotEmpty && slivers != null) {
      return slivers;
    }
  _bloc.productStreamsByCategory.forEach(
        (Stream<List<Product>> dataStream) {
    slivers.add(StreamBuilder(                               #1
        stream: dataStream,                                  #2
        builder: (context, AsyncSnapshot snapshot) {         #3
          return CustomSliverHeader(
            headerText:
                Humanize.productCategoryFromEnum(
                    snapshot?.data?.first?.category,
                ) ?? "header",                               #4
          );
        }));
    slivers.add(StreamBuilder(                               #5
        stream: dataStream,                                  #6
        builder: (context, AsyncSnapshot<List<Product>> snapshot) {
          return SliverGrid(
            gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
              crossAxisCount: 2,
              mainAxisSpacing: 8.0,
              crossAxisSpacing: 8.0,
            ),
            delegate: SliverChildBuilderDelegate(            #7
              (BuildContext context, int index) {
                var _product =
                    snapshot.data[index];                    #8
                return ProductDetailCard(
                  key: ValueKey(_product.imageTitle.toString()),
                  onTap: () => _toProductDetailPage(_product),
                  onLongPress: () => _showQuickAddToCart(context, _product),
                  product: _product,
                );
              },
              childCount: snapshot.data?.length ?? 0,
            ),
          );
        }));
  });
  return slivers;
}

9.5.3. The SliverGrid widget

The SliverGrid widget places its widgets in a two-dimensional arrangement. You tell the sliver grid how many columns there are, and it’ll lay them out in their order, from left to right first. When that row is full, it’ll begin on the left side of the next row. The SliverGrid itself is a pretty simple widget, accepting only two properties: SliverGrid .gridDeletate and SliverGrid.delegate.