PIGridContainer constructor

const PIGridContainer({
  1. Key? key,
  2. required int crossAxisCount,
  3. required List<Widget> children,
  4. required double width,
  5. double? itemHeight,
  6. double? itemSpacing,
  7. double? rowSpacing,
  8. Color? backgroundColor,
})

Implementation

const PIGridContainer(
    {Key? key,
    required this.crossAxisCount,
    required this.children,
    required this.width,
    this.itemHeight, // 如果不设置高度就等于宽度
    double? itemSpacing,
    double? rowSpacing,
    Color? backgroundColor})
    : this.itemSpacing = itemSpacing ?? 0.0,
      this.rowSpacing = rowSpacing ?? 0.0,
      this.backgroundColor = backgroundColor ?? Colors.white,
      super(key: key);