getTotal method

dynamic getTotal(
  1. List<ChartPieBean> data
)

计算数据总和

Implementation

getTotal(List<ChartPieBean> data) {
  double total = 0;
  for (var bean in data) {
    total += bean.value;
  }
  return total;
}