ResponsiveGrid constructor

const ResponsiveGrid({
  1. Key? key,
  2. List<Widget>? children,
  3. IndexedWidgetBuilder? itemBuilder,
  4. int? itemCount,
  5. double spacing = 10,
  6. double runSpacing = 10,
  7. double? childAspectRatio,
  8. EdgeInsetsGeometry? padding,
  9. int? watch,
  10. int? mobile,
  11. int? tablet,
  12. int? smallDesktop,
  13. int? desktop,
  14. int? largeDesktop,
  15. double? minItemWidth,
  16. bool scaleMinItemWidth = true,
  17. bool useSliver = false,
  18. bool shrinkWrap = false,
  19. ScrollPhysics? physics,
})

Implementation

const ResponsiveGrid({
  super.key,
  this.children,
  this.itemBuilder,
  this.itemCount,
  this.spacing = 10,
  this.runSpacing = 10,
  this.childAspectRatio,
  this.padding,
  this.watch,
  this.mobile,
  this.tablet,
  this.smallDesktop,
  this.desktop,
  this.largeDesktop,
  this.minItemWidth,
  this.scaleMinItemWidth = true,
  this.useSliver = false,
  this.shrinkWrap = false,
  this.physics,
})  : assert(
        (children != null) != (itemBuilder != null),
        "Provide either 'children' OR 'itemBuilder', not both.",
      ),
      assert(
        itemBuilder == null || itemCount != null,
        "If 'itemBuilder' is used, 'itemCount' must be provided.",
      ),
      assert(itemCount == null || itemCount >= 0, "itemCount must be >= 0"),
      assert(spacing >= 0, "Spacing must be positive"),
      assert(minItemWidth == null || minItemWidth > 0,
          "minItemWidth must be > 0");