generatedCityItemsHelper function

List<CityItem> generatedCityItemsHelper(
  1. CityCallback callback
)

Implementation

List<CityItem> generatedCityItemsHelper(CityCallback callback) {
  List<CityItem> list = [];
  var cityNames = cityName.split(",");
  for (var element in cityNames) {
    list.add(callback(element));
  }
  return list;
}