UIMasonry constructor

UIMasonry(
  1. Object? parent,
  2. Iterable<MasonryItem> items, {
  3. int? masonryWidthSize,
  4. int? masonryHeightSize,
  5. int? itemsMargin,
  6. double? dimensionTolerance,
  7. String? width,
  8. String? height,
  9. List<String>? scrollbarColors,
  10. dynamic classes,
  11. dynamic style,
})

Implementation

UIMasonry(super.parent, Iterable<MasonryItem> items,
    {int? masonryWidthSize,
    int? masonryHeightSize,
    int? itemsMargin,
    double? dimensionTolerance,
    String? width,
    String? height,
    this.scrollbarColors,
    super.classes,
    super.style})
    : items = List<MasonryItem>.from(items),
      super(componentClass: 'ui-masonry') {
  this.width = width;
  this.height = height;
  this.itemsMargin = itemsMargin;
  this.dimensionTolerance = dimensionTolerance;

  _masonryWidthSize = NNField<int?>(0,
      filter: (n) => n is int && n > 10 ? n : null,
      resolver: computeMasonryWidthSize);

  _masonryHeightSize = NNField<int?>(0,
      filter: (n) => n is int && n > 10 ? n : null,
      resolver: computeMasonryHeightSize);

  _masonryWidthSize.set(masonryWidthSize);
  _masonryHeightSize.set(masonryHeightSize);
  _computeGCDCache = CachedComputation(_computeGCDImpl);
}