LatLng.fromList constructor

LatLng.fromList(
  1. List list
)

Creates a LatLng from a list of doubles [longitude, latitude].

Implementation

factory LatLng.fromList(List<dynamic> list) {
  if (list.length != 2) {
    throw ArgumentError('List for LatLng must have exactly 2 elements');
  }
  return LatLng(list[1] as double, list[0] as double);
}