Div constructor

const Div({
  1. int colS = 12,
  2. int? colM,
  3. int? colL,
  4. required Widget child,
  5. int offsetS = 0,
  6. int offsetM = 0,
  7. int offsetL = 0,
  8. Key? key,
})

Implementation

const Div({
  this.colS = 12,
  this.colM,
  this.colL,
  required this.child,
  this.offsetS = 0,
  this.offsetM = 0,
  this.offsetL = 0,
  Key? key,
})  : assert(colS >= 0 && colS <= 12),
      assert(colM == null || (colM >= 0 && colM <= 12)),
      assert(colL == null || (colL >= 0 && colL <= 12)),
      assert(offsetS >= 0 && offsetS <= 11),
      assert(offsetM >= 0 && offsetM <= 11),
      assert(offsetL >= 0 && offsetL <= 11),
      assert(colS + offsetS <= 12,
          "sum of the col and the respective offset should be less than or equal to 12"),
      assert(colM == null || (colM + offsetM <= 12),
          "sum of the col and the respective offset should be less than or equal to 12"),
      assert(colL == null || (colL + offsetL <= 12),
          "sum of the col and the respective offset should be less than or equal to 12"),
      super(key: key);