Division constructor

const Division({
  1. int colXS = 12,
  2. int? colS,
  3. int? colM,
  4. int? colL,
  5. int? colXL,
  6. int offsetXS = 0,
  7. int offsetS = 0,
  8. int offsetM = 0,
  9. int offsetL = 0,
  10. int offsetXL = 0,
})

Implementation

const Division({
  this.colXS = 12,
  this.colS,
  this.colM,
  this.colL,
  this.colXL,
  this.offsetXS = 0,
  this.offsetS = 0,
  this.offsetM = 0,
  this.offsetL = 0,
  this.offsetXL = 0,
})  : assert(colXS >= 0 && colXS <= 12),
      assert(colS == null || (colS >= 0 && colS <= 12)),
      assert(colM == null || (colM >= 0 && colM <= 12)),
      assert(colL == null || (colL >= 0 && colL <= 12)),
      assert(colXL == null || (colXL >= 0 && colXL <= 12)),
      assert(offsetXS >= 0 && offsetXS <= 11),
      assert(offsetS >= 0 && offsetS <= 11),
      assert(offsetM >= 0 && offsetM <= 11),
      assert(offsetL >= 0 && offsetL <= 11),
      assert(offsetXL >= 0 && offsetXL <= 11),
      assert((colXS + offsetXS <= 12),
          "sum of the colXS and the respective offsetXS should be less than or equal to 12"),
      assert(colS == null || (colS + offsetS <= 12),
          "sum of the colS and the respective offsetS should be less than or equal to 12"),
      assert(colM == null || (colM + offsetM <= 12),
          "sum of the colM and the respective offsetM should be less than or equal to 12"),
      assert(colL == null || (colL + offsetL <= 12),
          "sum of the colL and the respective offsetL should be less than or equal to 12"),
      assert(colXL == null || (colXL + offsetXL <= 12),
          "sum of the colXL and the respective offsetXL should be less than or equal to 12");