concatenateArray function
Convert list of strings to a string with commas
Implementation
String concatenateArray(List<String> list) {
String output = '';
for (final String item in list) {
if (item == list.first) {
output += item;
} else {
output += ',$item';
}
}
return output;
}