PieData constructor

const PieData({
  1. required String label,
  2. double value = 0.0,
  3. required Color color,
  4. bool showValue = true,
  5. bool showLabel = true,
  6. double circleSize = 18.0,
})

Creates a pie chart segment.

label must not be empty. value must be non-negative and finite. color is required for rendering. showValue defaults to true to display the value on the chart.

Throws an AssertionError if value is negative or not finite, or if label is empty.

Implementation

const PieData({
  required this.label,
  this.value = 0.0,
  required this.color,
  this.showValue = true,
  this.showLabel = true,
  this.circleSize = 18.0,
});