ResponsiveElement constructor

ResponsiveElement({
  1. Key? key,
  2. required Widget element,
  3. required int deviceType,
  4. int? xs,
  5. int? sm,
  6. int? md,
  7. int? lg,
  8. int? xl,
})

Implementation

ResponsiveElement({Key? key,
  required this.element,
  required this.deviceType,
  this.xs,
  this.sm,
  this.md,
  this.lg,
  this.xl
}): super(key: key){
  assert(this.deviceType >= 0 && this.deviceType <= 4);
  if(this.xs != null){
    assert(this.xs! > 0 && this.xs! <= 12);
  }
  if(this.sm != null){
    assert(this.sm! > 0 && this.sm! <= 12);
  }
  if(this.md != null){
    assert(this.md! > 0 && this.md! <= 12);
  }
  if(this.lg != null){
    assert(this.lg! > 0 && this.lg! <= 12);
  }
  if(this.xl != null){
    assert(this.xl! > 0 && this.xl! <= 12);
  }

}