dart sum elements in list object code example Example: sum of the list in dart var sum = [1, 2, 3].reduce((a, b) => a + b);