The code block inside list.map is never executed.
This is because list.map produces a lazy transformation of the list. The transformation function is executed only when elements are requested from it.
You probably want to use:
var dates = list.map((DateTime time) {
var dateRange = DateFormat("MM-dd-yy").format(time);
return dateRange;
});
print(dates);
In the code above, it is the print function that forces the transformation to run.
Alternatively, you can transform the result of the list.map to a list using
var datesList = dates.toList();
Again, this forces eager evaluation of the map transformation.