buildSegmentsFromAccountItems function

List<RallyPieChartSegment> buildSegmentsFromAccountItems(
  1. List<AccountData> items
)

Implementation

List<RallyPieChartSegment> buildSegmentsFromAccountItems(
    List<AccountData> items) {
  return List<RallyPieChartSegment>.generate(
    items.length,
    (i) {
      return RallyPieChartSegment(
        color: RallyColors.accountColor(i),
        value: items[i].primaryAmount,
      );
    },
  );
}