convertingToLatLng static method

List<LatLng> convertingToLatLng(
  1. List pointsofList
)

Implementation

static List<LatLng> convertingToLatLng(List pointsofList) {
  List<LatLng> convertedList = <LatLng>[];
  for (int i = 0; i < pointsofList.length; i++) {
    if (i % 2 != 0) {
      convertedList.add(LatLng(pointsofList[i - 1], pointsofList[i]));
    }
  }
  return convertedList;
}