PieDataSet constructor

PieDataSet({
  1. required num value,
  2. String? legend,
  3. required PdfColor color,
  4. PdfColor? borderColor = PdfColors.white,
  5. double borderWidth = 1.5,
  6. bool? drawBorder,
  7. bool drawSurface = true,
  8. double surfaceOpacity = 1,
  9. double offset = 0,
  10. TextStyle? legendStyle,
  11. TextAlign? legendAlign,
  12. PieLegendPosition legendPosition = PieLegendPosition.auto,
  13. double legendLineWidth = 1.0,
  14. PdfColor? legendLineColor,
  15. Widget? legendWidget,
  16. double legendOffset = 20,
  17. double innerRadius = 0,
})

Implementation

PieDataSet({
  required this.value,
  String? legend,
  required PdfColor color,
  PdfColor? borderColor = PdfColors.white,
  double borderWidth = 1.5,
  bool? drawBorder,
  this.drawSurface = true,
  this.surfaceOpacity = 1,
  this.offset = 0,
  this.legendStyle,
  this.legendAlign,
  this.legendPosition = PieLegendPosition.auto,
  this.legendLineWidth = 1.0,
  PdfColor? legendLineColor,
  Widget? legendWidget,
  this.legendOffset = 20,
  this.innerRadius = 0,
})  : assert(innerRadius >= 0),
      assert(offset >= 0),
      drawBorder = drawBorder ?? borderColor != null && color != borderColor,
      assert((drawBorder ?? borderColor != null && color != borderColor) ||
          drawSurface),
      _legendWidget = legendWidget,
      legendLineColor = legendLineColor ?? color,
      super(
        legend: legend,
        color: color,
        borderColor: borderColor,
        borderWidth: borderWidth,
      );