buildSegmentsFromBillItems function

List<RallyPieChartSegment> buildSegmentsFromBillItems(
  1. List<BillData> items
)

Implementation

List<RallyPieChartSegment> buildSegmentsFromBillItems(List<BillData> items) {
  return List<RallyPieChartSegment>.generate(
    items.length,
    (i) {
      return RallyPieChartSegment(
        color: RallyColors.billColor(i),
        value: items[i].primaryAmount,
      );
    },
  );
}