AppMasonry constructor

const AppMasonry({
  1. Key? key,
  2. List<Widget>? children,
  3. int? itemCount,
  4. IndexedWidgetBuilder? itemBuilder,
  5. int? columnCount,
  6. double maxCrossAxisExtent = 320,
  7. double spacing = 12,
  8. double runSpacing = 12,
  9. EdgeInsetsGeometry padding = EdgeInsets.zero,
  10. ScrollPhysics? physics,
  11. bool shrinkWrap = false,
  12. bool reverse = false,
  13. bool? primary,
  14. ScrollController? controller,
})

Creates a masonry layout.

Provide either children or both itemCount and itemBuilder.

Implementation

const AppMasonry({
  super.key,
  this.children,
  this.itemCount,
  this.itemBuilder,
  this.columnCount,
  this.maxCrossAxisExtent = 320,
  this.spacing = 12,
  this.runSpacing = 12,
  this.padding = EdgeInsets.zero,
  this.physics,
  this.shrinkWrap = false,
  this.reverse = false,
  this.primary,
  this.controller,
}) : assert(
        children != null || (itemCount != null && itemBuilder != null),
        'Either children or (itemCount and itemBuilder) must be provided.',
      );