Is there a better way to calculate the moving sum of a list in flutter
Is there a better way to calculate a moving sum of a list? List<double?> rollingSum({int window = 3, List data = const []}) { List<double?> sum = []; int i = 0; int maxLength = data.length - window + 1;…