FFPieChart constructor

FFPieChart({
  1. Iterable<FFPieChart_FFPieChartSection>? sections,
  2. double? legacyDonutHoleRadius,
  3. @Deprecated('This field is deprecated.') FFColor? legacyDonutHoleColor,
  4. FFText? sectionLabelStyle,
  5. FFPieChart_SectionLabelType? sectionLabelType,
  6. @Deprecated('This field is deprecated.') Iterable<FFColor>? legacyListPieChartColors,
  7. FFChartLabelFormatInfo? labelFormat,
  8. Iterable<FFValue>? listPieChartColors,
  9. FFValue? donutHoleColor,
  10. FFDoubleValue? donutHoleRadiusValue,
  11. FFDoubleValue? sectionSpacingValue,
  12. FFDoubleValue? startAngleValue,
  13. FFDoubleValue? labelPositionValue,
})

Implementation

factory FFPieChart({
  $core.Iterable<FFPieChart_FFPieChartSection>? sections,
  $core.double? legacyDonutHoleRadius,
  @$core.Deprecated('This field is deprecated.')
  FFColor? legacyDonutHoleColor,
  FFText? sectionLabelStyle,
  FFPieChart_SectionLabelType? sectionLabelType,
  @$core.Deprecated('This field is deprecated.')
  $core.Iterable<FFColor>? legacyListPieChartColors,
  FFChartLabelFormatInfo? labelFormat,
  $core.Iterable<FFValue>? listPieChartColors,
  FFValue? donutHoleColor,
  FFDoubleValue? donutHoleRadiusValue,
  FFDoubleValue? sectionSpacingValue,
  FFDoubleValue? startAngleValue,
  FFDoubleValue? labelPositionValue,
}) {
  final result = create();
  if (sections != null) result.sections.addAll(sections);
  if (legacyDonutHoleRadius != null)
    result.legacyDonutHoleRadius = legacyDonutHoleRadius;
  if (legacyDonutHoleColor != null)
    result.legacyDonutHoleColor = legacyDonutHoleColor;
  if (sectionLabelStyle != null) result.sectionLabelStyle = sectionLabelStyle;
  if (sectionLabelType != null) result.sectionLabelType = sectionLabelType;
  if (legacyListPieChartColors != null)
    result.legacyListPieChartColors.addAll(legacyListPieChartColors);
  if (labelFormat != null) result.labelFormat = labelFormat;
  if (listPieChartColors != null)
    result.listPieChartColors.addAll(listPieChartColors);
  if (donutHoleColor != null) result.donutHoleColor = donutHoleColor;
  if (donutHoleRadiusValue != null)
    result.donutHoleRadiusValue = donutHoleRadiusValue;
  if (sectionSpacingValue != null)
    result.sectionSpacingValue = sectionSpacingValue;
  if (startAngleValue != null) result.startAngleValue = startAngleValue;
  if (labelPositionValue != null)
    result.labelPositionValue = labelPositionValue;
  return result;
}