BaseBean constructor

BaseBean({
  1. double xyLineWidth = 2,
  2. Color xColor = defaultColor,
  3. Color yColor = defaultColor,
  4. bool isShowBorderTop = false,
  5. bool isShowBorderRight = false,
  6. required List<DialStyleY> yDialValues,
  7. bool isLeftYDial = true,
  8. bool isLeftYDialSub = true,
  9. bool isShowX = true,
  10. double yMax = 100.0,
  11. double yMin = 0.0,
  12. EdgeInsets basePadding = defaultBasePadding,
  13. bool isShowHintX = false,
  14. bool isShowHintY = false,
  15. Color hintLineColor = defaultColor,
  16. double hintLineWidth = 1.0,
  17. bool isHintLineImaginary = false,
  18. bool isShowXScale = false,
  19. bool isShowYScale = false,
  20. double rulerWidth = 4,
  21. UnitXY? unitX,
  22. UnitXY? unitY,
})

Implementation

BaseBean({
  this.xyLineWidth = 2,
  this.xColor = defaultColor,
  this.yColor = defaultColor,
  this.isShowBorderTop = false,
  this.isShowBorderRight = false,
  required this.yDialValues,
  this.isLeftYDial = true,
  this.isLeftYDialSub = true,
  this.isShowX = true,
  this.yMax = 100.0,
  this.yMin = 0.0,
  this.basePadding = defaultBasePadding,
  this.isShowHintX = false,
  this.isShowHintY = false,
  this.hintLineColor = defaultColor,
  this.hintLineWidth = 1.0,
  this.isHintLineImaginary = false,
  this.isShowXScale = false,
  this.isShowYScale = false,
  this.rulerWidth = 4,
  this.unitX,
  this.unitY,
}) {
  //比率大的在前面排序
  yDialValues
      .sort((v1, v2) => v2.positionRetioy.compareTo(v1.positionRetioy));
}