SliverGridDelegateWithFixedCrossAxisCountAndFixedHeight constructor

const SliverGridDelegateWithFixedCrossAxisCountAndFixedHeight({
  1. required int crossAxisCount,
  2. double mainAxisSpacing = 0.0,
  3. double crossAxisSpacing = 0.0,
  4. double height = 56.0,
})

Creates a delegate that makes grid layouts with a fixed number of tiles in the cross axis.

All of the arguments must not be null. The mainAxisSpacing and crossAxisSpacing arguments must not be negative. The crossAxisCount and childAspectRatio arguments must be greater than zero.

Implementation

const SliverGridDelegateWithFixedCrossAxisCountAndFixedHeight({
  required this.crossAxisCount,
  this.mainAxisSpacing = 0.0,
  this.crossAxisSpacing = 0.0,
  this.height = 56.0,
})  : assert(crossAxisCount > 0),
      assert(mainAxisSpacing >= 0),
      assert(crossAxisSpacing >= 0),
      assert(height > 0);