ItemLayout constructor

ItemLayout({
  1. int? startX,
  2. int? startY,
  3. required int width,
  4. required int height,
  5. int minWidth = 1,
  6. int minHeight = 1,
  7. int? maxHeight,
  8. int? maxWidth,
})

Implementation

ItemLayout(
    {int? startX,
    int? startY,
    required this.width,
    required this.height,
    this.minWidth = 1,
    this.minHeight = 1,
    this.maxHeight,
    this.maxWidth})
    : assert(minWidth <= width),
      assert(minHeight <= height),
      assert(maxHeight == null || maxHeight >= height),
      assert(maxWidth == null || maxWidth >= width),
      _haveLocation = startX != null || startY != null,
      startX = startX ?? 0,
      startY = startY ?? 0;